<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# LINE 1 &quot;libraries\\ghci\\GHCi\\InfoTable.hsc&quot; #-}</span><span>
</span><span id="line-1"></span><span class="hs-pragma">{-# LANGUAGE CPP, MagicHash, ScopedTypeVariables #-}</span><span>
</span><span id="line-2"></span><span>
</span><span id="line-3"></span><span class="hs-comment">-- Get definitions for the structs, constants &amp; config etc.</span><span>
</span><span id="line-4"></span><span>
</span><span id="line-5"></span><span>
</span><span id="line-6"></span><span class="hs-comment">-- |</span><span>
</span><span id="line-7"></span><span class="hs-comment">-- Run-time info table support.  This module provides support for</span><span>
</span><span id="line-8"></span><span class="hs-comment">-- creating and reading info tables /in the running program/.</span><span>
</span><span id="line-9"></span><span class="hs-comment">-- We use the RTS data structures directly via hsc2hs.</span><span>
</span><span id="line-10"></span><span class="hs-comment">--</span><span>
</span><span id="line-11"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">GHCi.InfoTable</span><span>
</span><span id="line-12"></span><span>  </span><span class="hs-special">(</span><span>
</span><span id="line-13"></span><span>    </span><span class="annot"><a href="GHCi.InfoTable.html#mkConInfoTable"><span class="hs-identifier">mkConInfoTable</span></a></span><span>
</span><span id="line-14"></span><span>  </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-15"></span><span>
</span><span id="line-16"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Prelude.html#"><span class="hs-identifier">Prelude</span></a></span><span> </span><span class="hs-keyword">hiding</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Control.Monad.Fail.html#fail"><span class="hs-identifier">fail</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-comment">-- See note [Why do we import Prelude here?]</span><span>
</span><span id="line-17"></span><span>
</span><span id="line-18"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Foreign.html#"><span class="hs-identifier">Foreign</span></a></span><span>
</span><span id="line-19"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Foreign.C.html#"><span class="hs-identifier">Foreign.C</span></a></span><span>
</span><span id="line-20"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/GHC.Ptr.html#"><span class="hs-identifier">GHC.Ptr</span></a></span><span>
</span><span id="line-21"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/GHC.Exts.html#"><span class="hs-identifier">GHC.Exts</span></a></span><span>
</span><span id="line-22"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../ghc-heap/src/GHC.Exts.Heap.html#"><span class="hs-identifier">GHC.Exts.Heap</span></a></span><span>
</span><span id="line-23"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../bytestring/src/Data.ByteString.html#"><span class="hs-identifier">Data.ByteString</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../bytestring/src/Data.ByteString.Internal.html#ByteString"><span class="hs-identifier">ByteString</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-24"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Control.Monad.Fail.html#"><span class="hs-identifier">Control.Monad.Fail</span></a></span><span>
</span><span id="line-25"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="../../bytestring/src/Data.ByteString.html#"><span class="hs-identifier">Data.ByteString</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">BS</span></span><span>
</span><span id="line-26"></span><span>
</span><span id="line-27"></span><span class="hs-comment">-- NOTE: Must return a pointer acceptable for use in the header of a closure.</span><span>
</span><span id="line-28"></span><span class="hs-comment">-- If tables_next_to_code is enabled, then it must point the 'code' field.</span><span>
</span><span id="line-29"></span><span class="hs-comment">-- Otherwise, it should point to the start of the StgInfoTable.</span><span>
</span><span id="line-30"></span><span class="annot"><a href="GHCi.InfoTable.html#mkConInfoTable"><span class="hs-identifier hs-type">mkConInfoTable</span></a></span><span>
</span><span id="line-31"></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>    </span><span class="hs-comment">-- TABLES_NEXT_TO_CODE</span><span>
</span><span id="line-32"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span>     </span><span class="hs-comment">-- ptr words</span><span>
</span><span id="line-33"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span>     </span><span class="hs-comment">-- non-ptr words</span><span>
</span><span id="line-34"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span>     </span><span class="hs-comment">-- constr tag</span><span>
</span><span id="line-35"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span>     </span><span class="hs-comment">-- pointer tag</span><span>
</span><span id="line-36"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../bytestring/src/Data.ByteString.Internal.html#ByteString"><span class="hs-identifier hs-type">ByteString</span></a></span><span>  </span><span class="hs-comment">-- con desc</span><span>
</span><span id="line-37"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Ptr.html#Ptr"><span class="hs-identifier hs-type">Ptr</span></a></span><span> </span><span class="annot"><a href="../../ghc-heap/src/GHC.Exts.Heap.InfoTable.Types.html#StgInfoTable"><span class="hs-identifier hs-type">StgInfoTable</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-38"></span><span>      </span><span class="hs-comment">-- resulting info table is allocated with allocateExecPage(), and</span><span>
</span><span id="line-39"></span><span>      </span><span class="hs-comment">-- should be freed with freeExecPage().</span><span>
</span><span id="line-40"></span><span>
</span><span id="line-41"></span><span id="mkConInfoTable"><span class="annot"><span class="annottext">mkConInfoTable :: Bool
-&gt; Int -&gt; Int -&gt; Int -&gt; Int -&gt; ByteString -&gt; IO (Ptr StgInfoTable)
</span><a href="GHCi.InfoTable.html#mkConInfoTable"><span class="hs-identifier hs-var hs-var">mkConInfoTable</span></a></span></span><span> </span><span id="local-6989586621679087245"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679087245"><span class="hs-identifier hs-var">tables_next_to_code</span></a></span></span><span> </span><span id="local-6989586621679087244"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679087244"><span class="hs-identifier hs-var">ptr_words</span></a></span></span><span> </span><span id="local-6989586621679087243"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679087243"><span class="hs-identifier hs-var">nonptr_words</span></a></span></span><span> </span><span id="local-6989586621679087242"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679087242"><span class="hs-identifier hs-var">tag</span></a></span></span><span> </span><span id="local-6989586621679087241"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679087241"><span class="hs-identifier hs-var">ptrtag</span></a></span></span><span> </span><span id="local-6989586621679087240"><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679087240"><span class="hs-identifier hs-var">con_desc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-42"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679087239"><span class="annot"><span class="annottext">entry_addr :: EntryFunPtr
</span><a href="#local-6989586621679087239"><span class="hs-identifier hs-var hs-var">entry_addr</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[EntryFunPtr]
</span><a href="GHCi.InfoTable.html#interpConstrEntry"><span class="hs-identifier hs-var">interpConstrEntry</span></a></span><span> </span><span class="annot"><span class="annottext">[EntryFunPtr] -&gt; Int -&gt; EntryFunPtr
forall a. [a] -&gt; Int -&gt; a
</span><a href="../../base/src/GHC.List.html#%21%21"><span class="hs-operator hs-var">!!</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679087241"><span class="hs-identifier hs-var">ptrtag</span></a></span><span>
</span><span id="line-43"></span><span>  </span><span id="local-6989586621679087236"><span class="annot"><span class="annottext">Maybe ItblCodes
</span><a href="#local-6989586621679087236"><span class="hs-identifier hs-var">code'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679087245"><span class="hs-identifier hs-var">tables_next_to_code</span></a></span><span>
</span><span id="line-44"></span><span>    </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">ItblCodes -&gt; Maybe ItblCodes
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">(ItblCodes -&gt; Maybe ItblCodes)
-&gt; IO ItblCodes -&gt; IO (Maybe ItblCodes)
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/Data.Functor.html#%3C%24%3E"><span class="hs-operator hs-var">&lt;$&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">EntryFunPtr -&gt; IO ItblCodes
forall (m :: * -&gt; *). MonadFail m =&gt; EntryFunPtr -&gt; m ItblCodes
</span><a href="GHCi.InfoTable.html#mkJumpToAddr"><span class="hs-identifier hs-var">mkJumpToAddr</span></a></span><span> </span><span class="annot"><span class="annottext">EntryFunPtr
</span><a href="#local-6989586621679087239"><span class="hs-identifier hs-var">entry_addr</span></a></span><span>
</span><span id="line-45"></span><span>    </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Maybe ItblCodes -&gt; IO (Maybe ItblCodes)
forall (f :: * -&gt; *) a. Applicative f =&gt; a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var">pure</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe ItblCodes
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-46"></span><span>  </span><span class="hs-keyword">let</span><span>
</span><span id="line-47"></span><span>     </span><span id="local-6989586621679087227"><span class="annot"><span class="annottext">itbl :: StgInfoTable
</span><a href="#local-6989586621679087227"><span class="hs-identifier hs-var hs-var">itbl</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">StgInfoTable :: Maybe EntryFunPtr
-&gt; Word32
-&gt; Word32
-&gt; ClosureType
-&gt; Word32
-&gt; Maybe ItblCodes
-&gt; StgInfoTable
</span><a href="../../ghc-heap/src/GHC.Exts.Heap.InfoTable.Types.html#StgInfoTable"><span class="hs-identifier hs-type">StgInfoTable</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-48"></span><span>                 </span><span class="annot"><span class="annottext">entry :: Maybe EntryFunPtr
</span><a href="../../ghc-heap/src/GHC.Exts.Heap.InfoTable.Types.html#entry"><span class="hs-identifier hs-var">entry</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679087245"><span class="hs-identifier hs-var">tables_next_to_code</span></a></span><span>
</span><span id="line-49"></span><span>                         </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">Maybe EntryFunPtr
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-50"></span><span>                         </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">EntryFunPtr -&gt; Maybe EntryFunPtr
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">EntryFunPtr
</span><a href="#local-6989586621679087239"><span class="hs-identifier hs-var">entry_addr</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-51"></span><span>                 </span><span class="annot"><span class="annottext">ptrs :: Word32
</span><a href="../../ghc-heap/src/GHC.Exts.Heap.InfoTable.Types.html#ptrs"><span class="hs-identifier hs-var">ptrs</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Word32
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679087244"><span class="hs-identifier hs-var">ptr_words</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-52"></span><span>                 </span><span class="annot"><span class="annottext">nptrs :: Word32
</span><a href="../../ghc-heap/src/GHC.Exts.Heap.InfoTable.Types.html#nptrs"><span class="hs-identifier hs-var">nptrs</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Word32
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679087243"><span class="hs-identifier hs-var">nonptr_words</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-53"></span><span>                 </span><span class="annot"><span class="annottext">tipe :: ClosureType
</span><a href="../../ghc-heap/src/GHC.Exts.Heap.InfoTable.Types.html#tipe"><span class="hs-identifier hs-var">tipe</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ClosureType
</span><a href="../../ghc-heap/src/GHC.Exts.Heap.ClosureTypes.html#CONSTR"><span class="hs-identifier hs-var">CONSTR</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-54"></span><span>                 </span><span class="annot"><span class="annottext">srtlen :: Word32
</span><a href="../../ghc-heap/src/GHC.Exts.Heap.InfoTable.Types.html#srtlen"><span class="hs-identifier hs-var">srtlen</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Word32
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679087242"><span class="hs-identifier hs-var">tag</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-55"></span><span>                 </span><span class="annot"><span class="annottext">code :: Maybe ItblCodes
</span><a href="../../ghc-heap/src/GHC.Exts.Heap.InfoTable.Types.html#code"><span class="hs-identifier hs-var">code</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe ItblCodes
</span><a href="#local-6989586621679087236"><span class="hs-identifier hs-var">code'</span></a></span><span>
</span><span id="line-56"></span><span>              </span><span class="hs-special">}</span><span>
</span><span id="line-57"></span><span>  </span><span class="annot"><span class="annottext">FunPtr () -&gt; Ptr StgInfoTable
forall a b. FunPtr a -&gt; Ptr b
</span><a href="../../base/src/GHC.Ptr.html#castFunPtrToPtr"><span class="hs-identifier hs-var">castFunPtrToPtr</span></a></span><span> </span><span class="annot"><span class="annottext">(FunPtr () -&gt; Ptr StgInfoTable)
-&gt; IO (FunPtr ()) -&gt; IO (Ptr StgInfoTable)
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/Data.Functor.html#%3C%24%3E"><span class="hs-operator hs-var">&lt;$&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; StgInfoTable -&gt; ByteString -&gt; IO (FunPtr ())
</span><a href="GHCi.InfoTable.html#newExecConItbl"><span class="hs-identifier hs-var">newExecConItbl</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679087245"><span class="hs-identifier hs-var">tables_next_to_code</span></a></span><span> </span><span class="annot"><span class="annottext">StgInfoTable
</span><a href="#local-6989586621679087227"><span class="hs-identifier hs-var">itbl</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679087240"><span class="hs-identifier hs-var">con_desc</span></a></span><span>
</span><span id="line-58"></span><span>
</span><span id="line-59"></span><span>
</span><span id="line-60"></span><span class="hs-comment">-- -----------------------------------------------------------------------------</span><span>
</span><span id="line-61"></span><span class="hs-comment">-- Building machine code fragments for a constructor's entry code</span><span>
</span><span id="line-62"></span><span>
</span><span id="line-63"></span><span id="local-6989586621679087484"><span class="annot"><a href="GHCi.InfoTable.html#funPtrToInt"><span class="hs-identifier hs-type">funPtrToInt</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Ptr.html#FunPtr"><span class="hs-identifier hs-type">FunPtr</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679087484"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span></span><span>
</span><span id="line-64"></span><span id="funPtrToInt"><span class="annot"><span class="annottext">funPtrToInt :: forall a. FunPtr a -&gt; Int
</span><a href="GHCi.InfoTable.html#funPtrToInt"><span class="hs-identifier hs-var hs-var">funPtrToInt</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Ptr.html#FunPtr"><span class="hs-identifier hs-type">FunPtr</span></a></span><span> </span><span id="local-6989586621679087214"><span class="annot"><span class="annottext">Addr#
</span><a href="#local-6989586621679087214"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int
</span><span class="hs-identifier hs-var">I#</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Addr# -&gt; Int#
</span><span class="hs-identifier hs-var">addr2Int#</span></span><span> </span><span class="annot"><span class="annottext">Addr#
</span><a href="#local-6989586621679087214"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-65"></span><span>
</span><span id="line-66"></span><span class="hs-keyword">data</span><span> </span><span id="Arch"><span class="annot"><a href="GHCi.InfoTable.html#Arch"><span class="hs-identifier hs-var">Arch</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="ArchSPARC"><span class="annot"><a href="GHCi.InfoTable.html#ArchSPARC"><span class="hs-identifier hs-var">ArchSPARC</span></a></span></span><span>
</span><span id="line-67"></span><span>          </span><span class="hs-glyph">|</span><span> </span><span id="ArchPPC"><span class="annot"><a href="GHCi.InfoTable.html#ArchPPC"><span class="hs-identifier hs-var">ArchPPC</span></a></span></span><span>
</span><span id="line-68"></span><span>          </span><span class="hs-glyph">|</span><span> </span><span id="ArchX86"><span class="annot"><a href="GHCi.InfoTable.html#ArchX86"><span class="hs-identifier hs-var">ArchX86</span></a></span></span><span>
</span><span id="line-69"></span><span>          </span><span class="hs-glyph">|</span><span> </span><span id="ArchX86_64"><span class="annot"><a href="GHCi.InfoTable.html#ArchX86_64"><span class="hs-identifier hs-var">ArchX86_64</span></a></span></span><span>
</span><span id="line-70"></span><span>          </span><span class="hs-glyph">|</span><span> </span><span id="ArchAlpha"><span class="annot"><a href="GHCi.InfoTable.html#ArchAlpha"><span class="hs-identifier hs-var">ArchAlpha</span></a></span></span><span>
</span><span id="line-71"></span><span>          </span><span class="hs-glyph">|</span><span> </span><span id="ArchARM"><span class="annot"><a href="GHCi.InfoTable.html#ArchARM"><span class="hs-identifier hs-var">ArchARM</span></a></span></span><span>
</span><span id="line-72"></span><span>          </span><span class="hs-glyph">|</span><span> </span><span id="ArchAArch64"><span class="annot"><a href="GHCi.InfoTable.html#ArchAArch64"><span class="hs-identifier hs-var">ArchAArch64</span></a></span></span><span>
</span><span id="line-73"></span><span>          </span><span class="hs-glyph">|</span><span> </span><span id="ArchPPC64"><span class="annot"><a href="GHCi.InfoTable.html#ArchPPC64"><span class="hs-identifier hs-var">ArchPPC64</span></a></span></span><span>
</span><span id="line-74"></span><span>          </span><span class="hs-glyph">|</span><span> </span><span id="ArchPPC64LE"><span class="annot"><a href="GHCi.InfoTable.html#ArchPPC64LE"><span class="hs-identifier hs-var">ArchPPC64LE</span></a></span></span><span>
</span><span id="line-75"></span><span>          </span><span class="hs-glyph">|</span><span> </span><span id="ArchS390X"><span class="annot"><a href="GHCi.InfoTable.html#ArchS390X"><span class="hs-identifier hs-var">ArchS390X</span></a></span></span><span>
</span><span id="line-76"></span><span> </span><span class="hs-keyword">deriving</span><span> </span><span id="local-6989586621679087198"><span id="local-6989586621679087200"><span id="local-6989586621679087202"><span class="annot"><span class="annottext">Int -&gt; Arch -&gt; ShowS
[Arch] -&gt; ShowS
Arch -&gt; String
(Int -&gt; Arch -&gt; ShowS)
-&gt; (Arch -&gt; String) -&gt; ([Arch] -&gt; ShowS) -&gt; Show Arch
forall a.
(Int -&gt; a -&gt; ShowS) -&gt; (a -&gt; String) -&gt; ([a] -&gt; ShowS) -&gt; Show a
showList :: [Arch] -&gt; ShowS
$cshowList :: [Arch] -&gt; ShowS
show :: Arch -&gt; String
$cshow :: Arch -&gt; String
showsPrec :: Int -&gt; Arch -&gt; ShowS
$cshowsPrec :: Int -&gt; Arch -&gt; ShowS
</span><a href="../../base/src/GHC.Show.html#Show"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Show</span></a></span></span></span></span><span>
</span><span id="line-77"></span><span>
</span><span id="line-78"></span><span id="local-6989586621679087492"><span class="annot"><a href="GHCi.InfoTable.html#mkJumpToAddr"><span class="hs-identifier hs-type">mkJumpToAddr</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/Control.Monad.Fail.html#MonadFail"><span class="hs-identifier hs-type">MonadFail</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679087492"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../ghc-heap/src/GHC.Exts.Heap.InfoTable.Types.html#EntryFunPtr"><span class="hs-identifier hs-type">EntryFunPtr</span></a></span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679087492"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="../../ghc-heap/src/GHC.Exts.Heap.InfoTable.Types.html#ItblCodes"><span class="hs-identifier hs-type">ItblCodes</span></a></span></span><span>
</span><span id="line-79"></span><span id="mkJumpToAddr"><span class="annot"><span class="annottext">mkJumpToAddr :: forall (m :: * -&gt; *). MonadFail m =&gt; EntryFunPtr -&gt; m ItblCodes
</span><a href="GHCi.InfoTable.html#mkJumpToAddr"><span class="hs-identifier hs-var hs-var">mkJumpToAddr</span></a></span></span><span> </span><span id="local-6989586621679087187"><span class="annot"><span class="annottext">EntryFunPtr
</span><a href="#local-6989586621679087187"><span class="hs-identifier hs-var">ptr</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-80"></span><span>  </span><span id="local-6989586621679087186"><span class="annot"><span class="annottext">Arch
</span><a href="#local-6989586621679087186"><span class="hs-identifier hs-var">arch</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Maybe Arch
</span><a href="GHCi.InfoTable.html#mArch"><span class="hs-identifier hs-var">mArch</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-81"></span><span>    </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679087184"><span class="annot"><span class="annottext">Arch
</span><a href="#local-6989586621679087184"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Arch -&gt; m Arch
forall (f :: * -&gt; *) a. Applicative f =&gt; a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var">pure</span></a></span><span> </span><span class="annot"><span class="annottext">Arch
</span><a href="#local-6989586621679087184"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-82"></span><span>    </span><span class="annot"><span class="annottext">Maybe Arch
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-83"></span><span>      </span><span class="hs-comment">-- This code must not be called. You either need to add your</span><span>
</span><span id="line-84"></span><span>      </span><span class="hs-comment">-- architecture as a distinct case to 'Arch' and 'mArch', or use</span><span>
</span><span id="line-85"></span><span>      </span><span class="hs-comment">-- non-TABLES_NEXT_TO_CODE mode.</span><span>
</span><span id="line-86"></span><span>      </span><span class="annot"><span class="annottext">String -&gt; m Arch
forall (m :: * -&gt; *) a. MonadFail m =&gt; String -&gt; m a
</span><a href="../../base/src/Control.Monad.Fail.html#fail"><span class="hs-identifier hs-var">fail</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;mkJumpToAddr: Unknown obscure arch is not supported with TABLES_NEXT_TO_CODE&quot;</span></span><span>
</span><span id="line-87"></span><span>  </span><span class="annot"><span class="annottext">ItblCodes -&gt; m ItblCodes
forall (f :: * -&gt; *) a. Applicative f =&gt; a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var">pure</span></a></span><span> </span><span class="annot"><span class="annottext">(ItblCodes -&gt; m ItblCodes) -&gt; ItblCodes -&gt; m ItblCodes
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Arch -&gt; EntryFunPtr -&gt; ItblCodes
</span><a href="GHCi.InfoTable.html#mkJumpToAddr%27"><span class="hs-identifier hs-var">mkJumpToAddr'</span></a></span><span> </span><span class="annot"><span class="annottext">Arch
</span><a href="#local-6989586621679087186"><span class="hs-identifier hs-var">arch</span></a></span><span> </span><span class="annot"><span class="annottext">EntryFunPtr
</span><a href="#local-6989586621679087187"><span class="hs-identifier hs-var">ptr</span></a></span><span>
</span><span id="line-88"></span><span>
</span><span id="line-89"></span><span class="hs-comment">-- | 'Just' if it's a known OS, or 'Nothing' otherwise.</span><span>
</span><span id="line-90"></span><span class="annot"><a href="GHCi.InfoTable.html#mArch"><span class="hs-identifier hs-type">mArch</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHCi.InfoTable.html#Arch"><span class="hs-identifier hs-type">Arch</span></a></span><span>
</span><span id="line-91"></span><span id="mArch"><span class="annot"><span class="annottext">mArch :: Maybe Arch
</span><a href="GHCi.InfoTable.html#mArch"><span class="hs-identifier hs-var hs-var">mArch</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-92"></span><span>
</span><span id="line-93"></span><span class="hs-pragma">{-# LINE 99 &quot;libraries\\ghci\\GHCi\\InfoTable.hsc&quot; #-}</span><span>
</span><span id="line-99"></span><span>       </span><span class="annot"><span class="annottext">Arch -&gt; Maybe Arch
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">Arch
</span><a href="GHCi.InfoTable.html#ArchX86_64"><span class="hs-identifier hs-var">ArchX86_64</span></a></span><span>
</span><span id="line-100"></span><span>
</span><span id="line-101"></span><span class="hs-pragma">{-# LINE 115 &quot;libraries\\ghci\\GHCi\\InfoTable.hsc&quot; #-}</span><span>
</span><span id="line-115"></span><span>
</span><span id="line-116"></span><span class="annot"><a href="GHCi.InfoTable.html#mkJumpToAddr%27"><span class="hs-identifier hs-type">mkJumpToAddr'</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHCi.InfoTable.html#Arch"><span class="hs-identifier hs-type">Arch</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-heap/src/GHC.Exts.Heap.InfoTable.Types.html#EntryFunPtr"><span class="hs-identifier hs-type">EntryFunPtr</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-heap/src/GHC.Exts.Heap.InfoTable.Types.html#ItblCodes"><span class="hs-identifier hs-type">ItblCodes</span></a></span><span>
</span><span id="line-117"></span><span id="mkJumpToAddr%27"><span class="annot"><span class="annottext">mkJumpToAddr' :: Arch -&gt; EntryFunPtr -&gt; ItblCodes
</span><a href="GHCi.InfoTable.html#mkJumpToAddr%27"><span class="hs-identifier hs-var hs-var">mkJumpToAddr'</span></a></span></span><span> </span><span id="local-6989586621679087182"><span class="annot"><span class="annottext">Arch
</span><a href="#local-6989586621679087182"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span id="local-6989586621679087181"><span class="annot"><span class="annottext">EntryFunPtr
</span><a href="#local-6989586621679087181"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Arch
</span><a href="#local-6989586621679087182"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-118"></span><span>    </span><span class="annot"><span class="annottext">Arch
</span><a href="GHCi.InfoTable.html#ArchSPARC"><span class="hs-identifier hs-var">ArchSPARC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-119"></span><span>        </span><span class="hs-comment">-- After some consideration, we'll try this, where</span><span>
</span><span id="line-120"></span><span>        </span><span class="hs-comment">-- 0x55555555 stands in for the address to jump to.</span><span>
</span><span id="line-121"></span><span>        </span><span class="hs-comment">-- According to includes/rts/MachRegs.h, %g3 is very</span><span>
</span><span id="line-122"></span><span>        </span><span class="hs-comment">-- likely indeed to be baggable.</span><span>
</span><span id="line-123"></span><span>        </span><span class="hs-comment">--</span><span>
</span><span id="line-124"></span><span>        </span><span class="hs-comment">--   0000 07155555              sethi   %hi(0x55555555), %g3</span><span>
</span><span id="line-125"></span><span>        </span><span class="hs-comment">--   0004 8610E155              or      %g3, %lo(0x55555555), %g3</span><span>
</span><span id="line-126"></span><span>        </span><span class="hs-comment">--   0008 81C0C000              jmp     %g3</span><span>
</span><span id="line-127"></span><span>        </span><span class="hs-comment">--   000c 01000000              nop</span><span>
</span><span id="line-128"></span><span>
</span><span id="line-129"></span><span>        </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679087178"><span class="annot"><span class="annottext">w32 :: Word32
</span><a href="#local-6989586621679087178"><span class="hs-identifier hs-var hs-var">w32</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Word32
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">EntryFunPtr -&gt; Int
forall a. FunPtr a -&gt; Int
</span><a href="GHCi.InfoTable.html#funPtrToInt"><span class="hs-identifier hs-var">funPtrToInt</span></a></span><span> </span><span class="annot"><span class="annottext">EntryFunPtr
</span><a href="#local-6989586621679087181"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-130"></span><span>
</span><span id="line-131"></span><span>            </span><span class="annot"><a href="#local-6989586621679087177"><span class="hs-identifier hs-type">hi22</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="#local-6989586621679087176"><span class="hs-identifier hs-type">lo10</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word32"><span class="hs-identifier hs-type">Word32</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word32"><span class="hs-identifier hs-type">Word32</span></a></span><span>
</span><span id="line-132"></span><span>            </span><span id="local-6989586621679087176"><span class="annot"><span class="annottext">lo10 :: Word32 -&gt; Word32
</span><a href="#local-6989586621679087176"><span class="hs-identifier hs-var hs-var">lo10</span></a></span></span><span> </span><span id="local-6989586621679087175"><span class="annot"><span class="annottext">Word32
</span><a href="#local-6989586621679087175"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word32
</span><a href="#local-6989586621679087175"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; Word32 -&gt; Word32
forall a. Bits a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/Data.Bits.html#.%26."><span class="hs-operator hs-var">.&amp;.</span></a></span><span> </span><span class="annot"><span class="annottext">Word32
</span><span class="hs-number">0x3FF</span></span><span>
</span><span id="line-133"></span><span>            </span><span id="local-6989586621679087177"><span class="annot"><span class="annottext">hi22 :: Word32 -&gt; Word32
</span><a href="#local-6989586621679087177"><span class="hs-identifier hs-var hs-var">hi22</span></a></span></span><span> </span><span id="local-6989586621679087173"><span class="annot"><span class="annottext">Word32
</span><a href="#local-6989586621679087173"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word32
</span><a href="#local-6989586621679087173"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; Int -&gt; Word32
forall a. Bits a =&gt; a -&gt; Int -&gt; a
</span><a href="../../base/src/Data.Bits.html#shiftR"><span class="hs-operator hs-var">`shiftR`</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">10</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; Word32 -&gt; Word32
forall a. Bits a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/Data.Bits.html#.%26."><span class="hs-operator hs-var">.&amp;.</span></a></span><span> </span><span class="annot"><span class="annottext">Word32
</span><span class="hs-number">0x3FFFF</span></span><span>
</span><span id="line-134"></span><span>
</span><span id="line-135"></span><span>        </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">[Word32] -&gt; ItblCodes
forall a b. b -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-var">Right</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">Word32
</span><span class="hs-number">0x07000000</span></span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; Word32 -&gt; Word32
forall a. Bits a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/Data.Bits.html#.%7C."><span class="hs-operator hs-var">.|.</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word32 -&gt; Word32
</span><a href="#local-6989586621679087177"><span class="hs-identifier hs-var">hi22</span></a></span><span> </span><span class="annot"><span class="annottext">Word32
</span><a href="#local-6989586621679087178"><span class="hs-identifier hs-var">w32</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-136"></span><span>                   </span><span class="annot"><span class="annottext">Word32
</span><span class="hs-number">0x8610E000</span></span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; Word32 -&gt; Word32
forall a. Bits a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/Data.Bits.html#.%7C."><span class="hs-operator hs-var">.|.</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word32 -&gt; Word32
</span><a href="#local-6989586621679087176"><span class="hs-identifier hs-var">lo10</span></a></span><span> </span><span class="annot"><span class="annottext">Word32
</span><a href="#local-6989586621679087178"><span class="hs-identifier hs-var">w32</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-137"></span><span>                   </span><span class="annot"><span class="annottext">Word32
</span><span class="hs-number">0x81C0C000</span></span><span class="hs-special">,</span><span>
</span><span id="line-138"></span><span>                   </span><span class="annot"><span class="annottext">Word32
</span><span class="hs-number">0x01000000</span></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-139"></span><span>
</span><span id="line-140"></span><span>    </span><span class="annot"><span class="annottext">Arch
</span><a href="GHCi.InfoTable.html#ArchPPC"><span class="hs-identifier hs-var">ArchPPC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-141"></span><span>        </span><span class="hs-comment">-- We'll use r12, for no particular reason.</span><span>
</span><span id="line-142"></span><span>        </span><span class="hs-comment">-- 0xDEADBEEF stands for the address:</span><span>
</span><span id="line-143"></span><span>        </span><span class="hs-comment">-- 3D80DEAD lis r12,0xDEAD</span><span>
</span><span id="line-144"></span><span>        </span><span class="hs-comment">-- 618CBEEF ori r12,r12,0xBEEF</span><span>
</span><span id="line-145"></span><span>        </span><span class="hs-comment">-- 7D8903A6 mtctr r12</span><span>
</span><span id="line-146"></span><span>        </span><span class="hs-comment">-- 4E800420 bctr</span><span>
</span><span id="line-147"></span><span>
</span><span id="line-148"></span><span>        </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679087168"><span class="annot"><span class="annottext">w32 :: Word32
</span><a href="#local-6989586621679087168"><span class="hs-identifier hs-var hs-var">w32</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Word32
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">EntryFunPtr -&gt; Int
forall a. FunPtr a -&gt; Int
</span><a href="GHCi.InfoTable.html#funPtrToInt"><span class="hs-identifier hs-var">funPtrToInt</span></a></span><span> </span><span class="annot"><span class="annottext">EntryFunPtr
</span><a href="#local-6989586621679087181"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-149"></span><span>            </span><span id="local-6989586621679087162"><span class="annot"><span class="annottext">hi16 :: a -&gt; a
</span><a href="#local-6989586621679087162"><span class="hs-identifier hs-var hs-var">hi16</span></a></span></span><span> </span><span id="local-6989586621679087161"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679087161"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679087161"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; Int -&gt; a
forall a. Bits a =&gt; a -&gt; Int -&gt; a
</span><a href="../../base/src/Data.Bits.html#shiftR"><span class="hs-operator hs-var">`shiftR`</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">16</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Bits a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/Data.Bits.html#.%26."><span class="hs-operator hs-var">.&amp;.</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0xFFFF</span></span><span>
</span><span id="line-150"></span><span>            </span><span id="local-6989586621679087156"><span class="annot"><span class="annottext">lo16 :: a -&gt; a
</span><a href="#local-6989586621679087156"><span class="hs-identifier hs-var hs-var">lo16</span></a></span></span><span> </span><span id="local-6989586621679087155"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679087155"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679087155"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Bits a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/Data.Bits.html#.%26."><span class="hs-operator hs-var">.&amp;.</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0xFFFF</span></span><span>
</span><span id="line-151"></span><span>        </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">[Word32] -&gt; ItblCodes
forall a b. b -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-var">Right</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">Word32
</span><span class="hs-number">0x3D800000</span></span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; Word32 -&gt; Word32
forall a. Bits a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/Data.Bits.html#.%7C."><span class="hs-operator hs-var">.|.</span></a></span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; Word32
forall {a}. (Bits a, Num a) =&gt; a -&gt; a
</span><a href="#local-6989586621679087162"><span class="hs-identifier hs-var">hi16</span></a></span><span> </span><span class="annot"><span class="annottext">Word32
</span><a href="#local-6989586621679087168"><span class="hs-identifier hs-var">w32</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-152"></span><span>                   </span><span class="annot"><span class="annottext">Word32
</span><span class="hs-number">0x618C0000</span></span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; Word32 -&gt; Word32
forall a. Bits a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/Data.Bits.html#.%7C."><span class="hs-operator hs-var">.|.</span></a></span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; Word32
forall {a}. (Bits a, Num a) =&gt; a -&gt; a
</span><a href="#local-6989586621679087156"><span class="hs-identifier hs-var">lo16</span></a></span><span> </span><span class="annot"><span class="annottext">Word32
</span><a href="#local-6989586621679087168"><span class="hs-identifier hs-var">w32</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-153"></span><span>                   </span><span class="annot"><span class="annottext">Word32
</span><span class="hs-number">0x7D8903A6</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word32
</span><span class="hs-number">0x4E800420</span></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-154"></span><span>
</span><span id="line-155"></span><span>    </span><span class="annot"><span class="annottext">Arch
</span><a href="GHCi.InfoTable.html#ArchX86"><span class="hs-identifier hs-var">ArchX86</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-156"></span><span>        </span><span class="hs-comment">-- Let the address to jump to be 0xWWXXYYZZ.</span><span>
</span><span id="line-157"></span><span>        </span><span class="hs-comment">-- Generate   movl $0xWWXXYYZZ,%eax  ;  jmp *%eax</span><span>
</span><span id="line-158"></span><span>        </span><span class="hs-comment">-- which is</span><span>
</span><span id="line-159"></span><span>        </span><span class="hs-comment">-- B8 ZZ YY XX WW FF E0</span><span>
</span><span id="line-160"></span><span>
</span><span id="line-161"></span><span>        </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679087152"><span class="annot"><span class="annottext">w32 :: Word32
</span><a href="#local-6989586621679087152"><span class="hs-identifier hs-var hs-var">w32</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Word32
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">EntryFunPtr -&gt; Int
forall a. FunPtr a -&gt; Int
</span><a href="GHCi.InfoTable.html#funPtrToInt"><span class="hs-identifier hs-var">funPtrToInt</span></a></span><span> </span><span class="annot"><span class="annottext">EntryFunPtr
</span><a href="#local-6989586621679087181"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word32"><span class="hs-identifier hs-type">Word32</span></a></span><span>
</span><span id="line-162"></span><span>            </span><span class="annot"><a href="#local-6989586621679087151"><span class="hs-identifier hs-type">insnBytes</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-163"></span><span>            </span><span id="local-6989586621679087151"><span class="annot"><span class="annottext">insnBytes :: [Word8]
</span><a href="#local-6989586621679087151"><span class="hs-identifier hs-var hs-var">insnBytes</span></a></span></span><span>
</span><span id="line-164"></span><span>               </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0xB8</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; Word8
forall w. Integral w =&gt; w -&gt; Word8
</span><a href="GHCi.InfoTable.html#byte0"><span class="hs-identifier hs-var">byte0</span></a></span><span> </span><span class="annot"><span class="annottext">Word32
</span><a href="#local-6989586621679087152"><span class="hs-identifier hs-var">w32</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; Word8
forall w. (Integral w, Bits w) =&gt; w -&gt; Word8
</span><a href="GHCi.InfoTable.html#byte1"><span class="hs-identifier hs-var">byte1</span></a></span><span> </span><span class="annot"><span class="annottext">Word32
</span><a href="#local-6989586621679087152"><span class="hs-identifier hs-var">w32</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-165"></span><span>                        </span><span class="annot"><span class="annottext">Word32 -&gt; Word8
forall w. (Integral w, Bits w) =&gt; w -&gt; Word8
</span><a href="GHCi.InfoTable.html#byte2"><span class="hs-identifier hs-var">byte2</span></a></span><span> </span><span class="annot"><span class="annottext">Word32
</span><a href="#local-6989586621679087152"><span class="hs-identifier hs-var">w32</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; Word8
forall w. (Integral w, Bits w) =&gt; w -&gt; Word8
</span><a href="GHCi.InfoTable.html#byte3"><span class="hs-identifier hs-var">byte3</span></a></span><span> </span><span class="annot"><span class="annottext">Word32
</span><a href="#local-6989586621679087152"><span class="hs-identifier hs-var">w32</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-166"></span><span>                  </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0xFF</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0xE0</span></span><span class="hs-special">]</span><span>
</span><span id="line-167"></span><span>        </span><span class="hs-keyword">in</span><span>
</span><span id="line-168"></span><span>            </span><span class="annot"><span class="annottext">[Word8] -&gt; ItblCodes
forall a b. a -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-var">Left</span></a></span><span> </span><span class="annot"><span class="annottext">[Word8]
</span><a href="#local-6989586621679087151"><span class="hs-identifier hs-var">insnBytes</span></a></span><span>
</span><span id="line-169"></span><span>
</span><span id="line-170"></span><span>    </span><span class="annot"><span class="annottext">Arch
</span><a href="GHCi.InfoTable.html#ArchX86_64"><span class="hs-identifier hs-var">ArchX86_64</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-171"></span><span>        </span><span class="hs-comment">-- Generates:</span><span>
</span><span id="line-172"></span><span>        </span><span class="hs-comment">--      jmpq *.L1(%rip)</span><span>
</span><span id="line-173"></span><span>        </span><span class="hs-comment">--      .align 8</span><span>
</span><span id="line-174"></span><span>        </span><span class="hs-comment">-- .L1:</span><span>
</span><span id="line-175"></span><span>        </span><span class="hs-comment">--      .quad &lt;addr&gt;</span><span>
</span><span id="line-176"></span><span>        </span><span class="hs-comment">--</span><span>
</span><span id="line-177"></span><span>        </span><span class="hs-comment">-- which looks like:</span><span>
</span><span id="line-178"></span><span>        </span><span class="hs-comment">--     8:   ff 25 02 00 00 00     jmpq   *0x2(%rip)      # 10 &lt;f+0x10&gt;</span><span>
</span><span id="line-179"></span><span>        </span><span class="hs-comment">-- with addr at 10.</span><span>
</span><span id="line-180"></span><span>        </span><span class="hs-comment">--</span><span>
</span><span id="line-181"></span><span>        </span><span class="hs-comment">-- We need a full 64-bit pointer (we can't assume the info table is</span><span>
</span><span id="line-182"></span><span>        </span><span class="hs-comment">-- allocated in low memory).  Assuming the info pointer is aligned to</span><span>
</span><span id="line-183"></span><span>        </span><span class="hs-comment">-- an 8-byte boundary, the addr will also be aligned.</span><span>
</span><span id="line-184"></span><span>
</span><span id="line-185"></span><span>        </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679087144"><span class="annot"><span class="annottext">w64 :: Word64
</span><a href="#local-6989586621679087144"><span class="hs-identifier hs-var hs-var">w64</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Word64
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">EntryFunPtr -&gt; Int
forall a. FunPtr a -&gt; Int
</span><a href="GHCi.InfoTable.html#funPtrToInt"><span class="hs-identifier hs-var">funPtrToInt</span></a></span><span> </span><span class="annot"><span class="annottext">EntryFunPtr
</span><a href="#local-6989586621679087181"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word64"><span class="hs-identifier hs-type">Word64</span></a></span><span>
</span><span id="line-186"></span><span>            </span><span class="annot"><a href="#local-6989586621679087143"><span class="hs-identifier hs-type">insnBytes</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-187"></span><span>            </span><span id="local-6989586621679087143"><span class="annot"><span class="annottext">insnBytes :: [Word8]
</span><a href="#local-6989586621679087143"><span class="hs-identifier hs-var hs-var">insnBytes</span></a></span></span><span>
</span><span id="line-188"></span><span>               </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0xff</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0x25</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0x02</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0x00</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0x00</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0x00</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0x00</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0x00</span></span><span class="hs-special">,</span><span>
</span><span id="line-189"></span><span>                  </span><span class="annot"><span class="annottext">Word64 -&gt; Word8
forall w. Integral w =&gt; w -&gt; Word8
</span><a href="GHCi.InfoTable.html#byte0"><span class="hs-identifier hs-var">byte0</span></a></span><span> </span><span class="annot"><span class="annottext">Word64
</span><a href="#local-6989586621679087144"><span class="hs-identifier hs-var">w64</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word64 -&gt; Word8
forall w. (Integral w, Bits w) =&gt; w -&gt; Word8
</span><a href="GHCi.InfoTable.html#byte1"><span class="hs-identifier hs-var">byte1</span></a></span><span> </span><span class="annot"><span class="annottext">Word64
</span><a href="#local-6989586621679087144"><span class="hs-identifier hs-var">w64</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word64 -&gt; Word8
forall w. (Integral w, Bits w) =&gt; w -&gt; Word8
</span><a href="GHCi.InfoTable.html#byte2"><span class="hs-identifier hs-var">byte2</span></a></span><span> </span><span class="annot"><span class="annottext">Word64
</span><a href="#local-6989586621679087144"><span class="hs-identifier hs-var">w64</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word64 -&gt; Word8
forall w. (Integral w, Bits w) =&gt; w -&gt; Word8
</span><a href="GHCi.InfoTable.html#byte3"><span class="hs-identifier hs-var">byte3</span></a></span><span> </span><span class="annot"><span class="annottext">Word64
</span><a href="#local-6989586621679087144"><span class="hs-identifier hs-var">w64</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-190"></span><span>                  </span><span class="annot"><span class="annottext">Word64 -&gt; Word8
forall w. (Integral w, Bits w) =&gt; w -&gt; Word8
</span><a href="GHCi.InfoTable.html#byte4"><span class="hs-identifier hs-var">byte4</span></a></span><span> </span><span class="annot"><span class="annottext">Word64
</span><a href="#local-6989586621679087144"><span class="hs-identifier hs-var">w64</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word64 -&gt; Word8
forall w. (Integral w, Bits w) =&gt; w -&gt; Word8
</span><a href="GHCi.InfoTable.html#byte5"><span class="hs-identifier hs-var">byte5</span></a></span><span> </span><span class="annot"><span class="annottext">Word64
</span><a href="#local-6989586621679087144"><span class="hs-identifier hs-var">w64</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word64 -&gt; Word8
forall w. (Integral w, Bits w) =&gt; w -&gt; Word8
</span><a href="GHCi.InfoTable.html#byte6"><span class="hs-identifier hs-var">byte6</span></a></span><span> </span><span class="annot"><span class="annottext">Word64
</span><a href="#local-6989586621679087144"><span class="hs-identifier hs-var">w64</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word64 -&gt; Word8
forall w. (Integral w, Bits w) =&gt; w -&gt; Word8
</span><a href="GHCi.InfoTable.html#byte7"><span class="hs-identifier hs-var">byte7</span></a></span><span> </span><span class="annot"><span class="annottext">Word64
</span><a href="#local-6989586621679087144"><span class="hs-identifier hs-var">w64</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-191"></span><span>        </span><span class="hs-keyword">in</span><span>
</span><span id="line-192"></span><span>            </span><span class="annot"><span class="annottext">[Word8] -&gt; ItblCodes
forall a b. a -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-var">Left</span></a></span><span> </span><span class="annot"><span class="annottext">[Word8]
</span><a href="#local-6989586621679087143"><span class="hs-identifier hs-var">insnBytes</span></a></span><span>
</span><span id="line-193"></span><span>
</span><span id="line-194"></span><span>    </span><span class="annot"><span class="annottext">Arch
</span><a href="GHCi.InfoTable.html#ArchAlpha"><span class="hs-identifier hs-var">ArchAlpha</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-195"></span><span>        </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679087136"><span class="annot"><span class="annottext">w64 :: Word64
</span><a href="#local-6989586621679087136"><span class="hs-identifier hs-var hs-var">w64</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Word64
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">EntryFunPtr -&gt; Int
forall a. FunPtr a -&gt; Int
</span><a href="GHCi.InfoTable.html#funPtrToInt"><span class="hs-identifier hs-var">funPtrToInt</span></a></span><span> </span><span class="annot"><span class="annottext">EntryFunPtr
</span><a href="#local-6989586621679087181"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word64"><span class="hs-identifier hs-type">Word64</span></a></span><span>
</span><span id="line-196"></span><span>        </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">[Word32] -&gt; ItblCodes
forall a b. b -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-var">Right</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">Word32
</span><span class="hs-number">0xc3800000</span></span><span>      </span><span class="hs-comment">-- br   at, .+4</span><span>
</span><span id="line-197"></span><span>                 </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word32
</span><span class="hs-number">0xa79c000c</span></span><span>      </span><span class="hs-comment">-- ldq  at, 12(at)</span><span>
</span><span id="line-198"></span><span>                 </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word32
</span><span class="hs-number">0x6bfc0000</span></span><span>      </span><span class="hs-comment">-- jmp  (at)    # with zero hint -- oh well</span><span>
</span><span id="line-199"></span><span>                 </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word32
</span><span class="hs-number">0x47ff041f</span></span><span>      </span><span class="hs-comment">-- nop</span><span>
</span><span id="line-200"></span><span>                 </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word64 -&gt; Word32
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word64
</span><a href="#local-6989586621679087136"><span class="hs-identifier hs-var">w64</span></a></span><span> </span><span class="annot"><span class="annottext">Word64 -&gt; Word64 -&gt; Word64
forall a. Bits a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/Data.Bits.html#.%26."><span class="hs-operator hs-var">.&amp;.</span></a></span><span> </span><span class="annot"><span class="annottext">Word64
</span><span class="hs-number">0x0000FFFF</span></span><span class="hs-special">)</span><span>
</span><span id="line-201"></span><span>                 </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word64 -&gt; Word32
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word64
</span><a href="#local-6989586621679087136"><span class="hs-identifier hs-var">w64</span></a></span><span> </span><span class="annot"><span class="annottext">Word64 -&gt; Int -&gt; Word64
forall a. Bits a =&gt; a -&gt; Int -&gt; a
</span><a href="../../base/src/Data.Bits.html#shiftR"><span class="hs-operator hs-var">`shiftR`</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">32</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word64 -&gt; Word64 -&gt; Word64
forall a. Bits a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/Data.Bits.html#.%26."><span class="hs-operator hs-var">.&amp;.</span></a></span><span> </span><span class="annot"><span class="annottext">Word64
</span><span class="hs-number">0x0000FFFF</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-202"></span><span>
</span><span id="line-203"></span><span>    </span><span class="annot"><a href="GHCi.InfoTable.html#ArchARM"><span class="hs-identifier hs-type">ArchARM</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="hs-special">}</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-204"></span><span>        </span><span class="hs-comment">-- Generates Arm sequence,</span><span>
</span><span id="line-205"></span><span>        </span><span class="hs-comment">--      ldr r1, [pc, #0]</span><span>
</span><span id="line-206"></span><span>        </span><span class="hs-comment">--      bx r1</span><span>
</span><span id="line-207"></span><span>        </span><span class="hs-comment">--</span><span>
</span><span id="line-208"></span><span>        </span><span class="hs-comment">-- which looks like:</span><span>
</span><span id="line-209"></span><span>        </span><span class="hs-comment">--     00000000 &lt;.addr-0x8&gt;:</span><span>
</span><span id="line-210"></span><span>        </span><span class="hs-comment">--     0:       00109fe5    ldr    r1, [pc]      ; 8 &lt;.addr&gt;</span><span>
</span><span id="line-211"></span><span>        </span><span class="hs-comment">--     4:       11ff2fe1    bx     r1</span><span>
</span><span id="line-212"></span><span>        </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679087133"><span class="annot"><span class="annottext">w32 :: Word32
</span><a href="#local-6989586621679087133"><span class="hs-identifier hs-var hs-var">w32</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Word32
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">EntryFunPtr -&gt; Int
forall a. FunPtr a -&gt; Int
</span><a href="GHCi.InfoTable.html#funPtrToInt"><span class="hs-identifier hs-var">funPtrToInt</span></a></span><span> </span><span class="annot"><span class="annottext">EntryFunPtr
</span><a href="#local-6989586621679087181"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word32"><span class="hs-identifier hs-type">Word32</span></a></span><span>
</span><span id="line-213"></span><span>        </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">[Word8] -&gt; ItblCodes
forall a b. a -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-var">Left</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0x00</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0x10</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0x9f</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0xe5</span></span><span>
</span><span id="line-214"></span><span>                </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0x11</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0xff</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0x2f</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0xe1</span></span><span>
</span><span id="line-215"></span><span>                </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; Word8
forall w. Integral w =&gt; w -&gt; Word8
</span><a href="GHCi.InfoTable.html#byte0"><span class="hs-identifier hs-var">byte0</span></a></span><span> </span><span class="annot"><span class="annottext">Word32
</span><a href="#local-6989586621679087133"><span class="hs-identifier hs-var">w32</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; Word8
forall w. (Integral w, Bits w) =&gt; w -&gt; Word8
</span><a href="GHCi.InfoTable.html#byte1"><span class="hs-identifier hs-var">byte1</span></a></span><span> </span><span class="annot"><span class="annottext">Word32
</span><a href="#local-6989586621679087133"><span class="hs-identifier hs-var">w32</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; Word8
forall w. (Integral w, Bits w) =&gt; w -&gt; Word8
</span><a href="GHCi.InfoTable.html#byte2"><span class="hs-identifier hs-var">byte2</span></a></span><span> </span><span class="annot"><span class="annottext">Word32
</span><a href="#local-6989586621679087133"><span class="hs-identifier hs-var">w32</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; Word8
forall w. (Integral w, Bits w) =&gt; w -&gt; Word8
</span><a href="GHCi.InfoTable.html#byte3"><span class="hs-identifier hs-var">byte3</span></a></span><span> </span><span class="annot"><span class="annottext">Word32
</span><a href="#local-6989586621679087133"><span class="hs-identifier hs-var">w32</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-216"></span><span>
</span><span id="line-217"></span><span>    </span><span class="annot"><a href="GHCi.InfoTable.html#ArchAArch64"><span class="hs-identifier hs-type">ArchAArch64</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="hs-special">}</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-218"></span><span>        </span><span class="hs-comment">-- Generates:</span><span>
</span><span id="line-219"></span><span>        </span><span class="hs-comment">--</span><span>
</span><span id="line-220"></span><span>        </span><span class="hs-comment">--      ldr     x1, label</span><span>
</span><span id="line-221"></span><span>        </span><span class="hs-comment">--      br      x1</span><span>
</span><span id="line-222"></span><span>        </span><span class="hs-comment">-- label:</span><span>
</span><span id="line-223"></span><span>        </span><span class="hs-comment">--      .quad &lt;addr&gt;</span><span>
</span><span id="line-224"></span><span>        </span><span class="hs-comment">--</span><span>
</span><span id="line-225"></span><span>        </span><span class="hs-comment">-- which looks like:</span><span>
</span><span id="line-226"></span><span>        </span><span class="hs-comment">--     0:       58000041        ldr     x1, &lt;label&gt;</span><span>
</span><span id="line-227"></span><span>        </span><span class="hs-comment">--     4:       d61f0020        br      x1</span><span>
</span><span id="line-228"></span><span>       </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679087130"><span class="annot"><span class="annottext">w64 :: Word64
</span><a href="#local-6989586621679087130"><span class="hs-identifier hs-var hs-var">w64</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Word64
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">EntryFunPtr -&gt; Int
forall a. FunPtr a -&gt; Int
</span><a href="GHCi.InfoTable.html#funPtrToInt"><span class="hs-identifier hs-var">funPtrToInt</span></a></span><span> </span><span class="annot"><span class="annottext">EntryFunPtr
</span><a href="#local-6989586621679087181"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word64"><span class="hs-identifier hs-type">Word64</span></a></span><span>
</span><span id="line-229"></span><span>       </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">[Word32] -&gt; ItblCodes
forall a b. b -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-var">Right</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">Word32
</span><span class="hs-number">0x58000041</span></span><span>
</span><span id="line-230"></span><span>                </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word32
</span><span class="hs-number">0xd61f0020</span></span><span>
</span><span id="line-231"></span><span>                </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word64 -&gt; Word32
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="annot"><span class="annottext">Word64
</span><a href="#local-6989586621679087130"><span class="hs-identifier hs-var">w64</span></a></span><span>
</span><span id="line-232"></span><span>                </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word64 -&gt; Word32
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word64
</span><a href="#local-6989586621679087130"><span class="hs-identifier hs-var">w64</span></a></span><span> </span><span class="annot"><span class="annottext">Word64 -&gt; Int -&gt; Word64
forall a. Bits a =&gt; a -&gt; Int -&gt; a
</span><a href="../../base/src/Data.Bits.html#shiftR"><span class="hs-operator hs-var">`shiftR`</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">32</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-233"></span><span>    </span><span class="annot"><span class="annottext">Arch
</span><a href="GHCi.InfoTable.html#ArchPPC64"><span class="hs-identifier hs-var">ArchPPC64</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-234"></span><span>        </span><span class="hs-comment">-- We use the compiler's register r12 to read the function</span><span>
</span><span id="line-235"></span><span>        </span><span class="hs-comment">-- descriptor and the linker's register r11 as a temporary</span><span>
</span><span id="line-236"></span><span>        </span><span class="hs-comment">-- register to hold the function entry point.</span><span>
</span><span id="line-237"></span><span>        </span><span class="hs-comment">-- In the medium code model the function descriptor</span><span>
</span><span id="line-238"></span><span>        </span><span class="hs-comment">-- is located in the first two gigabytes, i.e. the address</span><span>
</span><span id="line-239"></span><span>        </span><span class="hs-comment">-- of the function pointer is a non-negative 32 bit number.</span><span>
</span><span id="line-240"></span><span>        </span><span class="hs-comment">-- 0x0EADBEEF stands for the address of the function pointer:</span><span>
</span><span id="line-241"></span><span>        </span><span class="hs-comment">--    0:   3d 80 0e ad     lis     r12,0x0EAD</span><span>
</span><span id="line-242"></span><span>        </span><span class="hs-comment">--    4:   61 8c be ef     ori     r12,r12,0xBEEF</span><span>
</span><span id="line-243"></span><span>        </span><span class="hs-comment">--    8:   e9 6c 00 00     ld      r11,0(r12)</span><span>
</span><span id="line-244"></span><span>        </span><span class="hs-comment">--    c:   e8 4c 00 08     ld      r2,8(r12)</span><span>
</span><span id="line-245"></span><span>        </span><span class="hs-comment">--   10:   7d 69 03 a6     mtctr   r11</span><span>
</span><span id="line-246"></span><span>        </span><span class="hs-comment">--   14:   e9 6c 00 10     ld      r11,16(r12)</span><span>
</span><span id="line-247"></span><span>        </span><span class="hs-comment">--   18:   4e 80 04 20     bctr</span><span>
</span><span id="line-248"></span><span>       </span><span class="hs-keyword">let</span><span>  </span><span id="local-6989586621679087127"><span class="annot"><span class="annottext">w32 :: Word32
</span><a href="#local-6989586621679087127"><span class="hs-identifier hs-var hs-var">w32</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Word32
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">EntryFunPtr -&gt; Int
forall a. FunPtr a -&gt; Int
</span><a href="GHCi.InfoTable.html#funPtrToInt"><span class="hs-identifier hs-var">funPtrToInt</span></a></span><span> </span><span class="annot"><span class="annottext">EntryFunPtr
</span><a href="#local-6989586621679087181"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-249"></span><span>            </span><span id="local-6989586621679087121"><span class="annot"><span class="annottext">hi16 :: a -&gt; a
</span><a href="#local-6989586621679087121"><span class="hs-identifier hs-var hs-var">hi16</span></a></span></span><span> </span><span id="local-6989586621679087120"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679087120"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679087120"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; Int -&gt; a
forall a. Bits a =&gt; a -&gt; Int -&gt; a
</span><a href="../../base/src/Data.Bits.html#shiftR"><span class="hs-operator hs-var">`shiftR`</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">16</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Bits a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/Data.Bits.html#.%26."><span class="hs-operator hs-var">.&amp;.</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0xFFFF</span></span><span>
</span><span id="line-250"></span><span>            </span><span id="local-6989586621679087115"><span class="annot"><span class="annottext">lo16 :: a -&gt; a
</span><a href="#local-6989586621679087115"><span class="hs-identifier hs-var hs-var">lo16</span></a></span></span><span> </span><span id="local-6989586621679087114"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679087114"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679087114"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Bits a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/Data.Bits.html#.%26."><span class="hs-operator hs-var">.&amp;.</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0xFFFF</span></span><span>
</span><span id="line-251"></span><span>       </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">[Word32] -&gt; ItblCodes
forall a b. b -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-var">Right</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">Word32
</span><span class="hs-number">0x3D800000</span></span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; Word32 -&gt; Word32
forall a. Bits a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/Data.Bits.html#.%7C."><span class="hs-operator hs-var">.|.</span></a></span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; Word32
forall {a}. (Bits a, Num a) =&gt; a -&gt; a
</span><a href="#local-6989586621679087121"><span class="hs-identifier hs-var">hi16</span></a></span><span> </span><span class="annot"><span class="annottext">Word32
</span><a href="#local-6989586621679087127"><span class="hs-identifier hs-var">w32</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-252"></span><span>                  </span><span class="annot"><span class="annottext">Word32
</span><span class="hs-number">0x618C0000</span></span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; Word32 -&gt; Word32
forall a. Bits a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/Data.Bits.html#.%7C."><span class="hs-operator hs-var">.|.</span></a></span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; Word32
forall {a}. (Bits a, Num a) =&gt; a -&gt; a
</span><a href="#local-6989586621679087115"><span class="hs-identifier hs-var">lo16</span></a></span><span> </span><span class="annot"><span class="annottext">Word32
</span><a href="#local-6989586621679087127"><span class="hs-identifier hs-var">w32</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-253"></span><span>                  </span><span class="annot"><span class="annottext">Word32
</span><span class="hs-number">0xE96C0000</span></span><span class="hs-special">,</span><span>
</span><span id="line-254"></span><span>                  </span><span class="annot"><span class="annottext">Word32
</span><span class="hs-number">0xE84C0008</span></span><span class="hs-special">,</span><span>
</span><span id="line-255"></span><span>                  </span><span class="annot"><span class="annottext">Word32
</span><span class="hs-number">0x7D6903A6</span></span><span class="hs-special">,</span><span>
</span><span id="line-256"></span><span>                  </span><span class="annot"><span class="annottext">Word32
</span><span class="hs-number">0xE96C0010</span></span><span class="hs-special">,</span><span>
</span><span id="line-257"></span><span>                  </span><span class="annot"><span class="annottext">Word32
</span><span class="hs-number">0x4E800420</span></span><span class="hs-special">]</span><span>
</span><span id="line-258"></span><span>
</span><span id="line-259"></span><span>    </span><span class="annot"><span class="annottext">Arch
</span><a href="GHCi.InfoTable.html#ArchPPC64LE"><span class="hs-identifier hs-var">ArchPPC64LE</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-260"></span><span>        </span><span class="hs-comment">-- The ABI requires r12 to point to the function's entry point.</span><span>
</span><span id="line-261"></span><span>        </span><span class="hs-comment">-- We use the medium code model where code resides in the first</span><span>
</span><span id="line-262"></span><span>        </span><span class="hs-comment">-- two gigabytes, so loading a non-negative32 bit address</span><span>
</span><span id="line-263"></span><span>        </span><span class="hs-comment">-- with lis followed by ori is fine.</span><span>
</span><span id="line-264"></span><span>        </span><span class="hs-comment">-- 0x0EADBEEF stands for the address:</span><span>
</span><span id="line-265"></span><span>        </span><span class="hs-comment">-- 3D800EAD lis r12,0x0EAD</span><span>
</span><span id="line-266"></span><span>        </span><span class="hs-comment">-- 618CBEEF ori r12,r12,0xBEEF</span><span>
</span><span id="line-267"></span><span>        </span><span class="hs-comment">-- 7D8903A6 mtctr r12</span><span>
</span><span id="line-268"></span><span>        </span><span class="hs-comment">-- 4E800420 bctr</span><span>
</span><span id="line-269"></span><span>
</span><span id="line-270"></span><span>        </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679087111"><span class="annot"><span class="annottext">w32 :: Word32
</span><a href="#local-6989586621679087111"><span class="hs-identifier hs-var hs-var">w32</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Word32
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">EntryFunPtr -&gt; Int
forall a. FunPtr a -&gt; Int
</span><a href="GHCi.InfoTable.html#funPtrToInt"><span class="hs-identifier hs-var">funPtrToInt</span></a></span><span> </span><span class="annot"><span class="annottext">EntryFunPtr
</span><a href="#local-6989586621679087181"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-271"></span><span>            </span><span id="local-6989586621679087105"><span class="annot"><span class="annottext">hi16 :: a -&gt; a
</span><a href="#local-6989586621679087105"><span class="hs-identifier hs-var hs-var">hi16</span></a></span></span><span> </span><span id="local-6989586621679087104"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679087104"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679087104"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; Int -&gt; a
forall a. Bits a =&gt; a -&gt; Int -&gt; a
</span><a href="../../base/src/Data.Bits.html#shiftR"><span class="hs-operator hs-var">`shiftR`</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">16</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Bits a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/Data.Bits.html#.%26."><span class="hs-operator hs-var">.&amp;.</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0xFFFF</span></span><span>
</span><span id="line-272"></span><span>            </span><span id="local-6989586621679087099"><span class="annot"><span class="annottext">lo16 :: a -&gt; a
</span><a href="#local-6989586621679087099"><span class="hs-identifier hs-var hs-var">lo16</span></a></span></span><span> </span><span id="local-6989586621679087098"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679087098"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679087098"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Bits a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/Data.Bits.html#.%26."><span class="hs-operator hs-var">.&amp;.</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0xFFFF</span></span><span>
</span><span id="line-273"></span><span>        </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">[Word32] -&gt; ItblCodes
forall a b. b -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-var">Right</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">Word32
</span><span class="hs-number">0x3D800000</span></span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; Word32 -&gt; Word32
forall a. Bits a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/Data.Bits.html#.%7C."><span class="hs-operator hs-var">.|.</span></a></span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; Word32
forall {a}. (Bits a, Num a) =&gt; a -&gt; a
</span><a href="#local-6989586621679087105"><span class="hs-identifier hs-var">hi16</span></a></span><span> </span><span class="annot"><span class="annottext">Word32
</span><a href="#local-6989586621679087111"><span class="hs-identifier hs-var">w32</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-274"></span><span>                   </span><span class="annot"><span class="annottext">Word32
</span><span class="hs-number">0x618C0000</span></span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; Word32 -&gt; Word32
forall a. Bits a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/Data.Bits.html#.%7C."><span class="hs-operator hs-var">.|.</span></a></span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; Word32
forall {a}. (Bits a, Num a) =&gt; a -&gt; a
</span><a href="#local-6989586621679087099"><span class="hs-identifier hs-var">lo16</span></a></span><span> </span><span class="annot"><span class="annottext">Word32
</span><a href="#local-6989586621679087111"><span class="hs-identifier hs-var">w32</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-275"></span><span>                   </span><span class="annot"><span class="annottext">Word32
</span><span class="hs-number">0x7D8903A6</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word32
</span><span class="hs-number">0x4E800420</span></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-276"></span><span>
</span><span id="line-277"></span><span>    </span><span class="annot"><span class="annottext">Arch
</span><a href="GHCi.InfoTable.html#ArchS390X"><span class="hs-identifier hs-var">ArchS390X</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-278"></span><span>        </span><span class="hs-comment">-- Let 0xAABBCCDDEEFFGGHH be the address to jump to.</span><span>
</span><span id="line-279"></span><span>        </span><span class="hs-comment">-- The following code loads the address into scratch</span><span>
</span><span id="line-280"></span><span>        </span><span class="hs-comment">-- register r1 and jumps to it.</span><span>
</span><span id="line-281"></span><span>        </span><span class="hs-comment">--</span><span>
</span><span id="line-282"></span><span>        </span><span class="hs-comment">--    0:   C0 1E AA BB CC DD       llihf   %r1,0xAABBCCDD</span><span>
</span><span id="line-283"></span><span>        </span><span class="hs-comment">--    6:   C0 19 EE FF GG HH       iilf    %r1,0xEEFFGGHH</span><span>
</span><span id="line-284"></span><span>        </span><span class="hs-comment">--   12:   07 F1                   br      %r1</span><span>
</span><span id="line-285"></span><span>
</span><span id="line-286"></span><span>        </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679087095"><span class="annot"><span class="annottext">w64 :: Word64
</span><a href="#local-6989586621679087095"><span class="hs-identifier hs-var hs-var">w64</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Word64
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">EntryFunPtr -&gt; Int
forall a. FunPtr a -&gt; Int
</span><a href="GHCi.InfoTable.html#funPtrToInt"><span class="hs-identifier hs-var">funPtrToInt</span></a></span><span> </span><span class="annot"><span class="annottext">EntryFunPtr
</span><a href="#local-6989586621679087181"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word64"><span class="hs-identifier hs-type">Word64</span></a></span><span>
</span><span id="line-287"></span><span>        </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">[Word8] -&gt; ItblCodes
forall a b. a -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-var">Left</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0xC0</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0x1E</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word64 -&gt; Word8
forall w. (Integral w, Bits w) =&gt; w -&gt; Word8
</span><a href="GHCi.InfoTable.html#byte7"><span class="hs-identifier hs-var">byte7</span></a></span><span> </span><span class="annot"><span class="annottext">Word64
</span><a href="#local-6989586621679087095"><span class="hs-identifier hs-var">w64</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word64 -&gt; Word8
forall w. (Integral w, Bits w) =&gt; w -&gt; Word8
</span><a href="GHCi.InfoTable.html#byte6"><span class="hs-identifier hs-var">byte6</span></a></span><span> </span><span class="annot"><span class="annottext">Word64
</span><a href="#local-6989586621679087095"><span class="hs-identifier hs-var">w64</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word64 -&gt; Word8
forall w. (Integral w, Bits w) =&gt; w -&gt; Word8
</span><a href="GHCi.InfoTable.html#byte5"><span class="hs-identifier hs-var">byte5</span></a></span><span> </span><span class="annot"><span class="annottext">Word64
</span><a href="#local-6989586621679087095"><span class="hs-identifier hs-var">w64</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word64 -&gt; Word8
forall w. (Integral w, Bits w) =&gt; w -&gt; Word8
</span><a href="GHCi.InfoTable.html#byte4"><span class="hs-identifier hs-var">byte4</span></a></span><span> </span><span class="annot"><span class="annottext">Word64
</span><a href="#local-6989586621679087095"><span class="hs-identifier hs-var">w64</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-288"></span><span>                  </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0xC0</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0x19</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word64 -&gt; Word8
forall w. (Integral w, Bits w) =&gt; w -&gt; Word8
</span><a href="GHCi.InfoTable.html#byte3"><span class="hs-identifier hs-var">byte3</span></a></span><span> </span><span class="annot"><span class="annottext">Word64
</span><a href="#local-6989586621679087095"><span class="hs-identifier hs-var">w64</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word64 -&gt; Word8
forall w. (Integral w, Bits w) =&gt; w -&gt; Word8
</span><a href="GHCi.InfoTable.html#byte2"><span class="hs-identifier hs-var">byte2</span></a></span><span> </span><span class="annot"><span class="annottext">Word64
</span><a href="#local-6989586621679087095"><span class="hs-identifier hs-var">w64</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word64 -&gt; Word8
forall w. (Integral w, Bits w) =&gt; w -&gt; Word8
</span><a href="GHCi.InfoTable.html#byte1"><span class="hs-identifier hs-var">byte1</span></a></span><span> </span><span class="annot"><span class="annottext">Word64
</span><a href="#local-6989586621679087095"><span class="hs-identifier hs-var">w64</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word64 -&gt; Word8
forall w. Integral w =&gt; w -&gt; Word8
</span><a href="GHCi.InfoTable.html#byte0"><span class="hs-identifier hs-var">byte0</span></a></span><span> </span><span class="annot"><span class="annottext">Word64
</span><a href="#local-6989586621679087095"><span class="hs-identifier hs-var">w64</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-289"></span><span>                  </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0x07</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0xF1</span></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-290"></span><span>
</span><span id="line-291"></span><span id="local-6989586621679087468"><span class="annot"><a href="GHCi.InfoTable.html#byte0"><span class="hs-identifier hs-type">byte0</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Real.html#Integral"><span class="hs-identifier hs-type">Integral</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679087468"><span class="hs-identifier hs-type">w</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679087468"><span class="hs-identifier hs-type">w</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span></span><span>
</span><span id="line-292"></span><span id="byte0"><span class="annot"><span class="annottext">byte0 :: forall w. Integral w =&gt; w -&gt; Word8
</span><a href="GHCi.InfoTable.html#byte0"><span class="hs-identifier hs-var hs-var">byte0</span></a></span></span><span> </span><span id="local-6989586621679087091"><span class="annot"><span class="annottext">w
</span><a href="#local-6989586621679087091"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">w -&gt; Word8
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="annot"><span class="annottext">w
</span><a href="#local-6989586621679087091"><span class="hs-identifier hs-var">w</span></a></span><span>
</span><span id="line-293"></span><span>
</span><span id="line-294"></span><span id="local-6989586621679087467"><span class="annot"><a href="GHCi.InfoTable.html#byte1"><span class="hs-identifier hs-type">byte1</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHCi.InfoTable.html#byte2"><span class="hs-identifier hs-type">byte2</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHCi.InfoTable.html#byte3"><span class="hs-identifier hs-type">byte3</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHCi.InfoTable.html#byte4"><span class="hs-identifier hs-type">byte4</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHCi.InfoTable.html#byte5"><span class="hs-identifier hs-type">byte5</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHCi.InfoTable.html#byte6"><span class="hs-identifier hs-type">byte6</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHCi.InfoTable.html#byte7"><span class="hs-identifier hs-type">byte7</span></a></span><span>
</span><span id="line-295"></span><span>       </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Real.html#Integral"><span class="hs-identifier hs-type">Integral</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679087467"><span class="hs-identifier hs-type">w</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/Data.Bits.html#Bits"><span class="hs-identifier hs-type">Bits</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679087467"><span class="hs-identifier hs-type">w</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679087467"><span class="hs-identifier hs-type">w</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span></span><span>
</span><span id="line-296"></span><span id="byte1"><span class="annot"><span class="annottext">byte1 :: forall w. (Integral w, Bits w) =&gt; w -&gt; Word8
</span><a href="GHCi.InfoTable.html#byte1"><span class="hs-identifier hs-var hs-var">byte1</span></a></span></span><span> </span><span id="local-6989586621679087085"><span class="annot"><span class="annottext">w
</span><a href="#local-6989586621679087085"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">w -&gt; Word8
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">w
</span><a href="#local-6989586621679087085"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">w -&gt; Int -&gt; w
forall a. Bits a =&gt; a -&gt; Int -&gt; a
</span><a href="../../base/src/Data.Bits.html#shiftR"><span class="hs-operator hs-var">`shiftR`</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">8</span></span><span class="hs-special">)</span><span>
</span><span id="line-297"></span><span id="byte2"><span class="annot"><span class="annottext">byte2 :: forall w. (Integral w, Bits w) =&gt; w -&gt; Word8
</span><a href="GHCi.InfoTable.html#byte2"><span class="hs-identifier hs-var hs-var">byte2</span></a></span></span><span> </span><span id="local-6989586621679087079"><span class="annot"><span class="annottext">w
</span><a href="#local-6989586621679087079"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">w -&gt; Word8
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">w
</span><a href="#local-6989586621679087079"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">w -&gt; Int -&gt; w
forall a. Bits a =&gt; a -&gt; Int -&gt; a
</span><a href="../../base/src/Data.Bits.html#shiftR"><span class="hs-operator hs-var">`shiftR`</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">16</span></span><span class="hs-special">)</span><span>
</span><span id="line-298"></span><span id="byte3"><span class="annot"><span class="annottext">byte3 :: forall w. (Integral w, Bits w) =&gt; w -&gt; Word8
</span><a href="GHCi.InfoTable.html#byte3"><span class="hs-identifier hs-var hs-var">byte3</span></a></span></span><span> </span><span id="local-6989586621679087073"><span class="annot"><span class="annottext">w
</span><a href="#local-6989586621679087073"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">w -&gt; Word8
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">w
</span><a href="#local-6989586621679087073"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">w -&gt; Int -&gt; w
forall a. Bits a =&gt; a -&gt; Int -&gt; a
</span><a href="../../base/src/Data.Bits.html#shiftR"><span class="hs-operator hs-var">`shiftR`</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">24</span></span><span class="hs-special">)</span><span>
</span><span id="line-299"></span><span id="byte4"><span class="annot"><span class="annottext">byte4 :: forall w. (Integral w, Bits w) =&gt; w -&gt; Word8
</span><a href="GHCi.InfoTable.html#byte4"><span class="hs-identifier hs-var hs-var">byte4</span></a></span></span><span> </span><span id="local-6989586621679087067"><span class="annot"><span class="annottext">w
</span><a href="#local-6989586621679087067"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">w -&gt; Word8
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">w
</span><a href="#local-6989586621679087067"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">w -&gt; Int -&gt; w
forall a. Bits a =&gt; a -&gt; Int -&gt; a
</span><a href="../../base/src/Data.Bits.html#shiftR"><span class="hs-operator hs-var">`shiftR`</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">32</span></span><span class="hs-special">)</span><span>
</span><span id="line-300"></span><span id="byte5"><span class="annot"><span class="annottext">byte5 :: forall w. (Integral w, Bits w) =&gt; w -&gt; Word8
</span><a href="GHCi.InfoTable.html#byte5"><span class="hs-identifier hs-var hs-var">byte5</span></a></span></span><span> </span><span id="local-6989586621679087061"><span class="annot"><span class="annottext">w
</span><a href="#local-6989586621679087061"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">w -&gt; Word8
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">w
</span><a href="#local-6989586621679087061"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">w -&gt; Int -&gt; w
forall a. Bits a =&gt; a -&gt; Int -&gt; a
</span><a href="../../base/src/Data.Bits.html#shiftR"><span class="hs-operator hs-var">`shiftR`</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">40</span></span><span class="hs-special">)</span><span>
</span><span id="line-301"></span><span id="byte6"><span class="annot"><span class="annottext">byte6 :: forall w. (Integral w, Bits w) =&gt; w -&gt; Word8
</span><a href="GHCi.InfoTable.html#byte6"><span class="hs-identifier hs-var hs-var">byte6</span></a></span></span><span> </span><span id="local-6989586621679087055"><span class="annot"><span class="annottext">w
</span><a href="#local-6989586621679087055"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">w -&gt; Word8
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">w
</span><a href="#local-6989586621679087055"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">w -&gt; Int -&gt; w
forall a. Bits a =&gt; a -&gt; Int -&gt; a
</span><a href="../../base/src/Data.Bits.html#shiftR"><span class="hs-operator hs-var">`shiftR`</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">48</span></span><span class="hs-special">)</span><span>
</span><span id="line-302"></span><span id="byte7"><span class="annot"><span class="annottext">byte7 :: forall w. (Integral w, Bits w) =&gt; w -&gt; Word8
</span><a href="GHCi.InfoTable.html#byte7"><span class="hs-identifier hs-var hs-var">byte7</span></a></span></span><span> </span><span id="local-6989586621679087049"><span class="annot"><span class="annottext">w
</span><a href="#local-6989586621679087049"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">w -&gt; Word8
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">w
</span><a href="#local-6989586621679087049"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">w -&gt; Int -&gt; w
forall a. Bits a =&gt; a -&gt; Int -&gt; a
</span><a href="../../base/src/Data.Bits.html#shiftR"><span class="hs-operator hs-var">`shiftR`</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">56</span></span><span class="hs-special">)</span><span>
</span><span id="line-303"></span><span>
</span><span id="line-304"></span><span>
</span><span id="line-305"></span><span class="hs-comment">-- -----------------------------------------------------------------------------</span><span>
</span><span id="line-306"></span><span class="hs-comment">-- read &amp; write intfo tables</span><span>
</span><span id="line-307"></span><span>
</span><span id="line-308"></span><span class="hs-comment">-- entry point for direct returns for created constr itbls</span><span>
</span><span id="line-309"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="annot"><span class="hs-keyword">ccall</span></span><span> </span><span class="annot"><span class="hs-string">&quot;&amp;stg_interp_constr1_entry&quot;</span></span><span> </span><span id="stg_interp_constr1_entry"><span class="annot"><a href="GHCi.InfoTable.html#stg_interp_constr1_entry"><span class="hs-identifier hs-var">stg_interp_constr1_entry</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-heap/src/GHC.Exts.Heap.InfoTable.Types.html#EntryFunPtr"><span class="hs-identifier hs-type">EntryFunPtr</span></a></span><span>
</span><span id="line-310"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="annot"><span class="hs-keyword">ccall</span></span><span> </span><span class="annot"><span class="hs-string">&quot;&amp;stg_interp_constr2_entry&quot;</span></span><span> </span><span id="stg_interp_constr2_entry"><span class="annot"><a href="GHCi.InfoTable.html#stg_interp_constr2_entry"><span class="hs-identifier hs-var">stg_interp_constr2_entry</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-heap/src/GHC.Exts.Heap.InfoTable.Types.html#EntryFunPtr"><span class="hs-identifier hs-type">EntryFunPtr</span></a></span><span>
</span><span id="line-311"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="annot"><span class="hs-keyword">ccall</span></span><span> </span><span class="annot"><span class="hs-string">&quot;&amp;stg_interp_constr3_entry&quot;</span></span><span> </span><span id="stg_interp_constr3_entry"><span class="annot"><a href="GHCi.InfoTable.html#stg_interp_constr3_entry"><span class="hs-identifier hs-var">stg_interp_constr3_entry</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-heap/src/GHC.Exts.Heap.InfoTable.Types.html#EntryFunPtr"><span class="hs-identifier hs-type">EntryFunPtr</span></a></span><span>
</span><span id="line-312"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="annot"><span class="hs-keyword">ccall</span></span><span> </span><span class="annot"><span class="hs-string">&quot;&amp;stg_interp_constr4_entry&quot;</span></span><span> </span><span id="stg_interp_constr4_entry"><span class="annot"><a href="GHCi.InfoTable.html#stg_interp_constr4_entry"><span class="hs-identifier hs-var">stg_interp_constr4_entry</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-heap/src/GHC.Exts.Heap.InfoTable.Types.html#EntryFunPtr"><span class="hs-identifier hs-type">EntryFunPtr</span></a></span><span>
</span><span id="line-313"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="annot"><span class="hs-keyword">ccall</span></span><span> </span><span class="annot"><span class="hs-string">&quot;&amp;stg_interp_constr5_entry&quot;</span></span><span> </span><span id="stg_interp_constr5_entry"><span class="annot"><a href="GHCi.InfoTable.html#stg_interp_constr5_entry"><span class="hs-identifier hs-var">stg_interp_constr5_entry</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-heap/src/GHC.Exts.Heap.InfoTable.Types.html#EntryFunPtr"><span class="hs-identifier hs-type">EntryFunPtr</span></a></span><span>
</span><span id="line-314"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="annot"><span class="hs-keyword">ccall</span></span><span> </span><span class="annot"><span class="hs-string">&quot;&amp;stg_interp_constr6_entry&quot;</span></span><span> </span><span id="stg_interp_constr6_entry"><span class="annot"><a href="GHCi.InfoTable.html#stg_interp_constr6_entry"><span class="hs-identifier hs-var">stg_interp_constr6_entry</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-heap/src/GHC.Exts.Heap.InfoTable.Types.html#EntryFunPtr"><span class="hs-identifier hs-type">EntryFunPtr</span></a></span><span>
</span><span id="line-315"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="annot"><span class="hs-keyword">ccall</span></span><span> </span><span class="annot"><span class="hs-string">&quot;&amp;stg_interp_constr7_entry&quot;</span></span><span> </span><span id="stg_interp_constr7_entry"><span class="annot"><a href="GHCi.InfoTable.html#stg_interp_constr7_entry"><span class="hs-identifier hs-var">stg_interp_constr7_entry</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-heap/src/GHC.Exts.Heap.InfoTable.Types.html#EntryFunPtr"><span class="hs-identifier hs-type">EntryFunPtr</span></a></span><span>
</span><span id="line-316"></span><span>
</span><span id="line-317"></span><span class="annot"><a href="GHCi.InfoTable.html#interpConstrEntry"><span class="hs-identifier hs-type">interpConstrEntry</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../ghc-heap/src/GHC.Exts.Heap.InfoTable.Types.html#EntryFunPtr"><span class="hs-identifier hs-type">EntryFunPtr</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-318"></span><span id="interpConstrEntry"><span class="annot"><span class="annottext">interpConstrEntry :: [EntryFunPtr]
</span><a href="GHCi.InfoTable.html#interpConstrEntry"><span class="hs-identifier hs-var hs-var">interpConstrEntry</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">String -&gt; EntryFunPtr
forall a. HasCallStack =&gt; String -&gt; a
</span><a href="../../base/src/GHC.Err.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;pointer tag 0&quot;</span></span><span>
</span><span id="line-319"></span><span>                    </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">EntryFunPtr
</span><a href="GHCi.InfoTable.html#stg_interp_constr1_entry"><span class="hs-identifier hs-var">stg_interp_constr1_entry</span></a></span><span>
</span><span id="line-320"></span><span>                    </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">EntryFunPtr
</span><a href="GHCi.InfoTable.html#stg_interp_constr2_entry"><span class="hs-identifier hs-var">stg_interp_constr2_entry</span></a></span><span>
</span><span id="line-321"></span><span>                    </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">EntryFunPtr
</span><a href="GHCi.InfoTable.html#stg_interp_constr3_entry"><span class="hs-identifier hs-var">stg_interp_constr3_entry</span></a></span><span>
</span><span id="line-322"></span><span>                    </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">EntryFunPtr
</span><a href="GHCi.InfoTable.html#stg_interp_constr4_entry"><span class="hs-identifier hs-var">stg_interp_constr4_entry</span></a></span><span>
</span><span id="line-323"></span><span>                    </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">EntryFunPtr
</span><a href="GHCi.InfoTable.html#stg_interp_constr5_entry"><span class="hs-identifier hs-var">stg_interp_constr5_entry</span></a></span><span>
</span><span id="line-324"></span><span>                    </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">EntryFunPtr
</span><a href="GHCi.InfoTable.html#stg_interp_constr6_entry"><span class="hs-identifier hs-var">stg_interp_constr6_entry</span></a></span><span>
</span><span id="line-325"></span><span>                    </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">EntryFunPtr
</span><a href="GHCi.InfoTable.html#stg_interp_constr7_entry"><span class="hs-identifier hs-var">stg_interp_constr7_entry</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-326"></span><span>
</span><span id="line-327"></span><span class="hs-keyword">data</span><span> </span><span id="StgConInfoTable"><span class="annot"><a href="GHCi.InfoTable.html#StgConInfoTable"><span class="hs-identifier hs-var">StgConInfoTable</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="StgConInfoTable"><span class="annot"><a href="GHCi.InfoTable.html#StgConInfoTable"><span class="hs-identifier hs-var">StgConInfoTable</span></a></span></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-328"></span><span>   </span><span id="conDesc"><span class="annot"><span class="annottext">StgConInfoTable -&gt; Ptr Word8
</span><a href="GHCi.InfoTable.html#conDesc"><span class="hs-identifier hs-var hs-var">conDesc</span></a></span></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Ptr.html#Ptr"><span class="hs-identifier hs-type">Ptr</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-329"></span><span>   </span><span id="infoTable"><span class="annot"><span class="annottext">StgConInfoTable -&gt; StgInfoTable
</span><a href="GHCi.InfoTable.html#infoTable"><span class="hs-identifier hs-var hs-var">infoTable</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-heap/src/GHC.Exts.Heap.InfoTable.Types.html#StgInfoTable"><span class="hs-identifier hs-type">StgInfoTable</span></a></span><span>
</span><span id="line-330"></span><span class="hs-special">}</span><span>
</span><span id="line-331"></span><span>
</span><span id="line-332"></span><span>
</span><span id="line-333"></span><span class="annot"><a href="GHCi.InfoTable.html#pokeConItbl"><span class="hs-identifier hs-type">pokeConItbl</span></a></span><span>
</span><span id="line-334"></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Ptr.html#Ptr"><span class="hs-identifier hs-type">Ptr</span></a></span><span> </span><span class="annot"><a href="GHCi.InfoTable.html#StgConInfoTable"><span class="hs-identifier hs-type">StgConInfoTable</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Ptr.html#Ptr"><span class="hs-identifier hs-type">Ptr</span></a></span><span> </span><span class="annot"><a href="GHCi.InfoTable.html#StgConInfoTable"><span class="hs-identifier hs-type">StgConInfoTable</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHCi.InfoTable.html#StgConInfoTable"><span class="hs-identifier hs-type">StgConInfoTable</span></a></span><span>
</span><span id="line-335"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-336"></span><span id="pokeConItbl"><span class="annot"><span class="annottext">pokeConItbl :: Bool
-&gt; Ptr StgConInfoTable
-&gt; Ptr StgConInfoTable
-&gt; StgConInfoTable
-&gt; IO ()
</span><a href="GHCi.InfoTable.html#pokeConItbl"><span class="hs-identifier hs-var hs-var">pokeConItbl</span></a></span></span><span> </span><span id="local-6989586621679087036"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679087036"><span class="hs-identifier hs-var">tables_next_to_code</span></a></span></span><span> </span><span id="local-6989586621679087035"><span class="annot"><span class="annottext">Ptr StgConInfoTable
</span><a href="#local-6989586621679087035"><span class="hs-identifier hs-var">wr_ptr</span></a></span></span><span> </span><span id="local-6989586621679087034"><span class="annot"><span class="annottext">Ptr StgConInfoTable
</span><a href="#local-6989586621679087034"><span class="hs-identifier hs-var">_ex_ptr</span></a></span></span><span> </span><span id="local-6989586621679087033"><span class="annot"><span class="annottext">StgConInfoTable
</span><a href="#local-6989586621679087033"><span class="hs-identifier hs-var">itbl</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-337"></span><span>  </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679087036"><span class="hs-identifier hs-var">tables_next_to_code</span></a></span><span>
</span><span id="line-338"></span><span>    </span><span class="hs-keyword">then</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-339"></span><span>      </span><span class="hs-comment">-- Write the offset to the con_desc from the end of the standard InfoTable</span><span>
</span><span id="line-340"></span><span>      </span><span class="hs-comment">-- at the first byte.</span><span>
</span><span id="line-341"></span><span>      </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679087032"><span class="annot"><span class="annottext">con_desc_offset :: Int
</span><a href="#local-6989586621679087032"><span class="hs-identifier hs-var hs-var">con_desc_offset</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">StgConInfoTable -&gt; Ptr Word8
</span><a href="GHCi.InfoTable.html#conDesc"><span class="hs-identifier hs-var hs-var">conDesc</span></a></span><span> </span><span class="annot"><span class="annottext">StgConInfoTable
</span><a href="#local-6989586621679087033"><span class="hs-identifier hs-var">itbl</span></a></span><span> </span><span class="annot"><span class="annottext">Ptr Word8 -&gt; Ptr Any -&gt; Int
forall a b. Ptr a -&gt; Ptr b -&gt; Int
</span><a href="../../base/src/GHC.Ptr.html#minusPtr"><span class="hs-operator hs-var">`minusPtr`</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Ptr StgConInfoTable
</span><a href="#local-6989586621679087034"><span class="hs-identifier hs-var">_ex_ptr</span></a></span><span> </span><span class="annot"><span class="annottext">Ptr StgConInfoTable -&gt; Int -&gt; Ptr Any
forall a b. Ptr a -&gt; Int -&gt; Ptr b
</span><a href="../../base/src/GHC.Ptr.html#plusPtr"><span class="hs-operator hs-var">`plusPtr`</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="GHCi.InfoTable.html#conInfoTableSizeB"><span class="hs-identifier hs-var">conInfoTableSizeB</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-342"></span><span>      </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621679087028"><span class="annot"><span class="annottext">Ptr StgConInfoTable
</span><a href="#local-6989586621679087028"><span class="hs-identifier hs-var">hsc_ptr</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Ptr StgConInfoTable -&gt; Int -&gt; Int -&gt; IO ()
forall a b. Storable a =&gt; Ptr b -&gt; Int -&gt; a -&gt; IO ()
</span><a href="../../base/src/Foreign.Storable.html#pokeByteOff"><span class="hs-identifier hs-var">pokeByteOff</span></a></span><span> </span><span class="annot"><span class="annottext">Ptr StgConInfoTable
</span><a href="#local-6989586621679087028"><span class="hs-identifier hs-var">hsc_ptr</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Ptr StgConInfoTable
</span><a href="#local-6989586621679087035"><span class="hs-identifier hs-var">wr_ptr</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679087032"><span class="hs-identifier hs-var">con_desc_offset</span></a></span><span>
</span><span id="line-343"></span><span class="hs-pragma">{-# LINE 343 &quot;libraries\\ghci\\GHCi\\InfoTable.hsc&quot; #-}</span><span>
</span><span id="line-343"></span><span>    </span><span class="hs-keyword">else</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-344"></span><span>      </span><span class="hs-comment">-- Write the con_desc address after the end of the info table.</span><span>
</span><span id="line-345"></span><span>      </span><span class="hs-comment">-- Use itblSize because CPP will not pick up PROFILING when calculating</span><span>
</span><span id="line-346"></span><span>      </span><span class="hs-comment">-- the offset.</span><span>
</span><span id="line-347"></span><span>      </span><span class="annot"><span class="annottext">Ptr StgConInfoTable -&gt; Int -&gt; Ptr Word8 -&gt; IO ()
forall a b. Storable a =&gt; Ptr b -&gt; Int -&gt; a -&gt; IO ()
</span><a href="../../base/src/Foreign.Storable.html#pokeByteOff"><span class="hs-identifier hs-var">pokeByteOff</span></a></span><span> </span><span class="annot"><span class="annottext">Ptr StgConInfoTable
</span><a href="#local-6989586621679087035"><span class="hs-identifier hs-var">wr_ptr</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="../../ghc-heap/src/GHC.Exts.Heap.InfoTable.html#itblSize"><span class="hs-identifier hs-var">itblSize</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">StgConInfoTable -&gt; Ptr Word8
</span><a href="GHCi.InfoTable.html#conDesc"><span class="hs-identifier hs-var hs-var">conDesc</span></a></span><span> </span><span class="annot"><span class="annottext">StgConInfoTable
</span><a href="#local-6989586621679087033"><span class="hs-identifier hs-var">itbl</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-348"></span><span>  </span><span class="annot"><span class="annottext">Ptr StgInfoTable -&gt; StgInfoTable -&gt; IO ()
</span><a href="../../ghc-heap/src/GHC.Exts.Heap.InfoTable.html#pokeItbl"><span class="hs-identifier hs-var">pokeItbl</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Ptr StgConInfoTable
</span><a href="#local-6989586621679087035"><span class="hs-identifier hs-var">wr_ptr</span></a></span><span> </span><span class="annot"><span class="annottext">Ptr StgConInfoTable -&gt; Int -&gt; Ptr StgInfoTable
forall a b. Ptr a -&gt; Int -&gt; Ptr b
</span><a href="../../base/src/GHC.Ptr.html#plusPtr"><span class="hs-operator hs-var">`plusPtr`</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">8</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">StgConInfoTable -&gt; StgInfoTable
</span><a href="GHCi.InfoTable.html#infoTable"><span class="hs-identifier hs-var hs-var">infoTable</span></a></span><span> </span><span class="annot"><span class="annottext">StgConInfoTable
</span><a href="#local-6989586621679087033"><span class="hs-identifier hs-var">itbl</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-349"></span><span class="hs-pragma">{-# LINE 349 &quot;libraries\\ghci\\GHCi\\InfoTable.hsc&quot; #-}</span><span>
</span><span id="line-349"></span><span>
</span><span id="line-350"></span><span id="local-6989586621679087445"><span class="annot"><a href="GHCi.InfoTable.html#sizeOfEntryCode"><span class="hs-identifier hs-type">sizeOfEntryCode</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/Control.Monad.Fail.html#MonadFail"><span class="hs-identifier hs-type">MonadFail</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679087445"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679087445"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span></span><span>
</span><span id="line-351"></span><span id="sizeOfEntryCode"><span class="annot"><span class="annottext">sizeOfEntryCode :: forall (m :: * -&gt; *). MonadFail m =&gt; Bool -&gt; m Int
</span><a href="GHCi.InfoTable.html#sizeOfEntryCode"><span class="hs-identifier hs-var hs-var">sizeOfEntryCode</span></a></span></span><span> </span><span id="local-6989586621679087005"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679087005"><span class="hs-identifier hs-var">tables_next_to_code</span></a></span></span><span>
</span><span id="line-352"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679087005"><span class="hs-identifier hs-var">tables_next_to_code</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; m Int
forall (f :: * -&gt; *) a. Applicative f =&gt; a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var">pure</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span>
</span><span id="line-353"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-354"></span><span>     </span><span id="local-6989586621679087003"><span class="annot"><span class="annottext">ItblCodes
</span><a href="#local-6989586621679087003"><span class="hs-identifier hs-var">code'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">EntryFunPtr -&gt; m ItblCodes
forall (m :: * -&gt; *). MonadFail m =&gt; EntryFunPtr -&gt; m ItblCodes
</span><a href="GHCi.InfoTable.html#mkJumpToAddr"><span class="hs-identifier hs-var">mkJumpToAddr</span></a></span><span> </span><span class="annot"><span class="annottext">EntryFunPtr
forall a. HasCallStack =&gt; a
</span><a href="../../base/src/GHC.Err.html#undefined"><span class="hs-identifier hs-var">undefined</span></a></span><span>
</span><span id="line-355"></span><span>     </span><span class="annot"><span class="annottext">Int -&gt; m Int
forall (f :: * -&gt; *) a. Applicative f =&gt; a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var">pure</span></a></span><span> </span><span class="annot"><span class="annottext">(Int -&gt; m Int) -&gt; Int -&gt; m Int
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">ItblCodes
</span><a href="#local-6989586621679087003"><span class="hs-identifier hs-var">code'</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-356"></span><span>       </span><span class="annot"><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-type">Left</span></a></span><span>  </span><span id="local-6989586621679087001"><span class="annot"><span class="annottext">[Word8]
</span><a href="#local-6989586621679087001"><span class="hs-identifier hs-var">xs</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Word8 -&gt; Int
forall a. Storable a =&gt; a -&gt; Int
</span><a href="../../base/src/Foreign.Storable.html#sizeOf"><span class="hs-identifier hs-var">sizeOf</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Word8] -&gt; Word8
forall a. [a] -&gt; a
</span><a href="../../base/src/GHC.List.html#head"><span class="hs-identifier hs-var">head</span></a></span><span> </span><span class="annot"><span class="annottext">[Word8]
</span><a href="#local-6989586621679087001"><span class="hs-identifier hs-var">xs</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="annot"><span class="annottext">[Word8] -&gt; Int
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Int
</span><a href="../../base/src/Data.Foldable.html#length"><span class="hs-identifier hs-var">length</span></a></span><span> </span><span class="annot"><span class="annottext">[Word8]
</span><a href="#local-6989586621679087001"><span class="hs-identifier hs-var">xs</span></a></span><span>
</span><span id="line-357"></span><span>       </span><span class="annot"><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-type">Right</span></a></span><span> </span><span id="local-6989586621679086996"><span class="annot"><span class="annottext">[Word32]
</span><a href="#local-6989586621679086996"><span class="hs-identifier hs-var">xs</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; Int
forall a. Storable a =&gt; a -&gt; Int
</span><a href="../../base/src/Foreign.Storable.html#sizeOf"><span class="hs-identifier hs-var">sizeOf</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Word32] -&gt; Word32
forall a. [a] -&gt; a
</span><a href="../../base/src/GHC.List.html#head"><span class="hs-identifier hs-var">head</span></a></span><span> </span><span class="annot"><span class="annottext">[Word32]
</span><a href="#local-6989586621679086996"><span class="hs-identifier hs-var">xs</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="annot"><span class="annottext">[Word32] -&gt; Int
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Int
</span><a href="../../base/src/Data.Foldable.html#length"><span class="hs-identifier hs-var">length</span></a></span><span> </span><span class="annot"><span class="annottext">[Word32]
</span><a href="#local-6989586621679086996"><span class="hs-identifier hs-var">xs</span></a></span><span>
</span><span id="line-358"></span><span>
</span><span id="line-359"></span><span class="hs-comment">-- Note: Must return proper pointer for use in a closure</span><span>
</span><span id="line-360"></span><span class="annot"><a href="GHCi.InfoTable.html#newExecConItbl"><span class="hs-identifier hs-type">newExecConItbl</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-heap/src/GHC.Exts.Heap.InfoTable.Types.html#StgInfoTable"><span class="hs-identifier hs-type">StgInfoTable</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../bytestring/src/Data.ByteString.Internal.html#ByteString"><span class="hs-identifier hs-type">ByteString</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Ptr.html#FunPtr"><span class="hs-identifier hs-type">FunPtr</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-361"></span><span id="newExecConItbl"><span class="annot"><span class="annottext">newExecConItbl :: Bool -&gt; StgInfoTable -&gt; ByteString -&gt; IO (FunPtr ())
</span><a href="GHCi.InfoTable.html#newExecConItbl"><span class="hs-identifier hs-var hs-var">newExecConItbl</span></a></span></span><span> </span><span id="local-6989586621679086995"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679086995"><span class="hs-identifier hs-var">tables_next_to_code</span></a></span></span><span> </span><span id="local-6989586621679086994"><span class="annot"><span class="annottext">StgInfoTable
</span><a href="#local-6989586621679086994"><span class="hs-identifier hs-var">obj</span></a></span></span><span> </span><span id="local-6989586621679086993"><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679086993"><span class="hs-identifier hs-var">con_desc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-362"></span><span>    </span><span id="local-6989586621679086992"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679086992"><span class="hs-identifier hs-var">sz0</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; IO Int
forall (m :: * -&gt; *). MonadFail m =&gt; Bool -&gt; m Int
</span><a href="GHCi.InfoTable.html#sizeOfEntryCode"><span class="hs-identifier hs-var">sizeOfEntryCode</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679086995"><span class="hs-identifier hs-var">tables_next_to_code</span></a></span><span>
</span><span id="line-363"></span><span>    </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679086989"><span class="annot"><span class="annottext">lcon_desc :: Int
</span><a href="#local-6989586621679086989"><span class="hs-identifier hs-var hs-var">lcon_desc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ByteString -&gt; Int
</span><a href="../../bytestring/src/Data.ByteString.html#length"><span class="hs-identifier hs-var">BS.length</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679086993"><span class="hs-identifier hs-var">con_desc</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-comment">{- null terminator -}</span><span>
</span><span id="line-364"></span><span>        </span><span class="hs-comment">-- SCARY</span><span>
</span><span id="line-365"></span><span>        </span><span class="hs-comment">-- This size represents the number of bytes in an StgConInfoTable.</span><span>
</span><span id="line-366"></span><span>        </span><span id="local-6989586621679086983"><span class="annot"><span class="annottext">sz :: CSize
</span><a href="#local-6989586621679086983"><span class="hs-identifier hs-var hs-var">sz</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; CSize
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="annot"><span class="annottext">(Int -&gt; CSize) -&gt; Int -&gt; CSize
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="GHCi.InfoTable.html#conInfoTableSizeB"><span class="hs-identifier hs-var">conInfoTableSizeB</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679086992"><span class="hs-identifier hs-var">sz0</span></a></span><span>
</span><span id="line-367"></span><span>            </span><span class="hs-comment">-- Note: we need to allocate the conDesc string next to the info</span><span>
</span><span id="line-368"></span><span>            </span><span class="hs-comment">-- table, because on a 64-bit platform we reference this string</span><span>
</span><span id="line-369"></span><span>            </span><span class="hs-comment">-- with a 32-bit offset relative to the info table, so if we</span><span>
</span><span id="line-370"></span><span>            </span><span class="hs-comment">-- allocated the string separately it might be out of range.</span><span>
</span><span id="line-371"></span><span>
</span><span id="line-372"></span><span>    </span><span id="local-6989586621679086982"><span class="annot"><span class="annottext">Ptr StgConInfoTable
</span><a href="#local-6989586621679086982"><span class="hs-identifier hs-var">ex_ptr</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">CSize
-&gt; (Ptr StgConInfoTable -&gt; Ptr StgConInfoTable -&gt; IO ())
-&gt; IO (Ptr StgConInfoTable)
forall a. CSize -&gt; (Ptr a -&gt; Ptr a -&gt; IO ()) -&gt; IO (Ptr a)
</span><a href="GHCi.InfoTable.html#fillExecBuffer"><span class="hs-identifier hs-var">fillExecBuffer</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CSize
</span><a href="#local-6989586621679086983"><span class="hs-identifier hs-var">sz</span></a></span><span> </span><span class="annot"><span class="annottext">CSize -&gt; CSize -&gt; CSize
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; CSize
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679086989"><span class="hs-identifier hs-var">lcon_desc</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">((Ptr StgConInfoTable -&gt; Ptr StgConInfoTable -&gt; IO ())
 -&gt; IO (Ptr StgConInfoTable))
-&gt; (Ptr StgConInfoTable -&gt; Ptr StgConInfoTable -&gt; IO ())
-&gt; IO (Ptr StgConInfoTable)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679086980"><span class="annot"><span class="annottext">Ptr StgConInfoTable
</span><a href="#local-6989586621679086980"><span class="hs-identifier hs-var">wr_ptr</span></a></span></span><span> </span><span id="local-6989586621679086979"><span class="annot"><span class="annottext">Ptr StgConInfoTable
</span><a href="#local-6989586621679086979"><span class="hs-identifier hs-var">ex_ptr</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-373"></span><span>        </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679086976"><span class="annot"><span class="annottext">cinfo :: StgConInfoTable
</span><a href="#local-6989586621679086976"><span class="hs-identifier hs-var hs-var">cinfo</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">StgConInfoTable :: Ptr Word8 -&gt; StgInfoTable -&gt; StgConInfoTable
</span><a href="GHCi.InfoTable.html#StgConInfoTable"><span class="hs-identifier hs-type">StgConInfoTable</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">conDesc :: Ptr Word8
</span><a href="GHCi.InfoTable.html#conDesc"><span class="hs-identifier hs-var">conDesc</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Ptr StgConInfoTable
</span><a href="#local-6989586621679086979"><span class="hs-identifier hs-var">ex_ptr</span></a></span><span> </span><span class="annot"><span class="annottext">Ptr StgConInfoTable -&gt; Int -&gt; Ptr Word8
forall a b. Ptr a -&gt; Int -&gt; Ptr b
</span><a href="../../base/src/GHC.Ptr.html#plusPtr"><span class="hs-operator hs-var">`plusPtr`</span></a></span><span> </span><span class="annot"><span class="annottext">CSize -&gt; Int
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="annot"><span class="annottext">CSize
</span><a href="#local-6989586621679086983"><span class="hs-identifier hs-var">sz</span></a></span><span>
</span><span id="line-374"></span><span>                                    </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">infoTable :: StgInfoTable
</span><a href="GHCi.InfoTable.html#infoTable"><span class="hs-identifier hs-var">infoTable</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">StgInfoTable
</span><a href="#local-6989586621679086994"><span class="hs-identifier hs-var">obj</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-375"></span><span>        </span><span class="annot"><span class="annottext">Bool
-&gt; Ptr StgConInfoTable
-&gt; Ptr StgConInfoTable
-&gt; StgConInfoTable
-&gt; IO ()
</span><a href="GHCi.InfoTable.html#pokeConItbl"><span class="hs-identifier hs-var">pokeConItbl</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679086995"><span class="hs-identifier hs-var">tables_next_to_code</span></a></span><span> </span><span class="annot"><span class="annottext">Ptr StgConInfoTable
</span><a href="#local-6989586621679086980"><span class="hs-identifier hs-var">wr_ptr</span></a></span><span> </span><span class="annot"><span class="annottext">Ptr StgConInfoTable
</span><a href="#local-6989586621679086979"><span class="hs-identifier hs-var">ex_ptr</span></a></span><span> </span><span class="annot"><span class="annottext">StgConInfoTable
</span><a href="#local-6989586621679086976"><span class="hs-identifier hs-var">cinfo</span></a></span><span>
</span><span id="line-376"></span><span>        </span><span class="annot"><span class="annottext">ByteString -&gt; (CStringLen -&gt; IO ()) -&gt; IO ()
forall a. ByteString -&gt; (CStringLen -&gt; IO a) -&gt; IO a
</span><a href="../../bytestring/src/Data.ByteString.html#useAsCStringLen"><span class="hs-identifier hs-var">BS.useAsCStringLen</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679086993"><span class="hs-identifier hs-var">con_desc</span></a></span><span> </span><span class="annot"><span class="annottext">((CStringLen -&gt; IO ()) -&gt; IO ()) -&gt; (CStringLen -&gt; IO ()) -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span class="hs-special">(</span><span id="local-6989586621679086974"><span class="annot"><span class="annottext">Ptr CChar
</span><a href="#local-6989586621679086974"><span class="hs-identifier hs-var">src</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679086973"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679086973"><span class="hs-identifier hs-var">len</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-377"></span><span>            </span><span class="annot"><span class="annottext">Ptr CChar -&gt; Ptr CChar -&gt; Int -&gt; IO ()
forall a. Ptr a -&gt; Ptr a -&gt; Int -&gt; IO ()
</span><a href="../../base/src/Foreign.Marshal.Utils.html#copyBytes"><span class="hs-identifier hs-var">copyBytes</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Ptr StgConInfoTable -&gt; Ptr Any
forall a b. Ptr a -&gt; Ptr b
</span><a href="../../base/src/GHC.Ptr.html#castPtr"><span class="hs-identifier hs-var">castPtr</span></a></span><span> </span><span class="annot"><span class="annottext">Ptr StgConInfoTable
</span><a href="#local-6989586621679086980"><span class="hs-identifier hs-var">wr_ptr</span></a></span><span> </span><span class="annot"><span class="annottext">Ptr Any -&gt; Int -&gt; Ptr CChar
forall a b. Ptr a -&gt; Int -&gt; Ptr b
</span><a href="../../base/src/GHC.Ptr.html#plusPtr"><span class="hs-operator hs-var">`plusPtr`</span></a></span><span> </span><span class="annot"><span class="annottext">CSize -&gt; Int
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="annot"><span class="annottext">CSize
</span><a href="#local-6989586621679086983"><span class="hs-identifier hs-var">sz</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Ptr CChar
</span><a href="#local-6989586621679086974"><span class="hs-identifier hs-var">src</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679086973"><span class="hs-identifier hs-var">len</span></a></span><span>
</span><span id="line-378"></span><span>        </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679086965"><span class="annot"><span class="annottext">null_off :: Int
</span><a href="#local-6989586621679086965"><span class="hs-identifier hs-var hs-var">null_off</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CSize -&gt; Int
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="annot"><span class="annottext">CSize
</span><a href="#local-6989586621679086983"><span class="hs-identifier hs-var">sz</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ByteString -&gt; Int
</span><a href="../../bytestring/src/Data.ByteString.html#length"><span class="hs-identifier hs-var">BS.length</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679086993"><span class="hs-identifier hs-var">con_desc</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-379"></span><span>        </span><span class="annot"><span class="annottext">Ptr Word8 -&gt; Word8 -&gt; IO ()
forall a. Storable a =&gt; Ptr a -&gt; a -&gt; IO ()
</span><a href="../../base/src/Foreign.Storable.html#poke"><span class="hs-identifier hs-var">poke</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Ptr StgConInfoTable -&gt; Ptr Any
forall a b. Ptr a -&gt; Ptr b
</span><a href="../../base/src/GHC.Ptr.html#castPtr"><span class="hs-identifier hs-var">castPtr</span></a></span><span> </span><span class="annot"><span class="annottext">Ptr StgConInfoTable
</span><a href="#local-6989586621679086980"><span class="hs-identifier hs-var">wr_ptr</span></a></span><span> </span><span class="annot"><span class="annottext">Ptr Any -&gt; Int -&gt; Ptr Word8
forall a b. Ptr a -&gt; Int -&gt; Ptr b
</span><a href="../../base/src/GHC.Ptr.html#plusPtr"><span class="hs-operator hs-var">`plusPtr`</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679086965"><span class="hs-identifier hs-var">null_off</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0</span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-380"></span><span>
</span><span id="line-381"></span><span>    </span><span class="annot"><span class="annottext">FunPtr () -&gt; IO (FunPtr ())
forall (f :: * -&gt; *) a. Applicative f =&gt; a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var">pure</span></a></span><span> </span><span class="annot"><span class="annottext">(FunPtr () -&gt; IO (FunPtr ())) -&gt; FunPtr () -&gt; IO (FunPtr ())
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679086995"><span class="hs-identifier hs-var">tables_next_to_code</span></a></span><span>
</span><span id="line-382"></span><span>      </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">Ptr Any -&gt; FunPtr ()
forall a b. Ptr a -&gt; FunPtr b
</span><a href="../../base/src/GHC.Ptr.html#castPtrToFunPtr"><span class="hs-identifier hs-var">castPtrToFunPtr</span></a></span><span> </span><span class="annot"><span class="annottext">(Ptr Any -&gt; FunPtr ()) -&gt; Ptr Any -&gt; FunPtr ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Ptr StgConInfoTable
</span><a href="#local-6989586621679086982"><span class="hs-identifier hs-var">ex_ptr</span></a></span><span> </span><span class="annot"><span class="annottext">Ptr StgConInfoTable -&gt; Int -&gt; Ptr Any
forall a b. Ptr a -&gt; Int -&gt; Ptr b
</span><a href="../../base/src/GHC.Ptr.html#plusPtr"><span class="hs-operator hs-var">`plusPtr`</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="GHCi.InfoTable.html#conInfoTableSizeB"><span class="hs-identifier hs-var">conInfoTableSizeB</span></a></span><span>
</span><span id="line-383"></span><span>      </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Ptr StgConInfoTable -&gt; FunPtr ()
forall a b. Ptr a -&gt; FunPtr b
</span><a href="../../base/src/GHC.Ptr.html#castPtrToFunPtr"><span class="hs-identifier hs-var">castPtrToFunPtr</span></a></span><span> </span><span class="annot"><span class="annottext">Ptr StgConInfoTable
</span><a href="#local-6989586621679086982"><span class="hs-identifier hs-var">ex_ptr</span></a></span><span>
</span><span id="line-384"></span><span>
</span><span id="line-385"></span><span class="hs-comment">-- | Allocate a buffer of a given size, use the given action to fill it with</span><span>
</span><span id="line-386"></span><span class="hs-comment">-- data, and mark it as executable. The action is given a writable pointer and</span><span>
</span><span id="line-387"></span><span class="hs-comment">-- the executable pointer. Returns a pointer to the executable code.</span><span>
</span><span id="line-388"></span><span id="local-6989586621679087437"><span class="annot"><a href="GHCi.InfoTable.html#fillExecBuffer"><span class="hs-identifier hs-type">fillExecBuffer</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/Foreign.C.Types.html#CSize"><span class="hs-identifier hs-type">CSize</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Ptr.html#Ptr"><span class="hs-identifier hs-type">Ptr</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679087437"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Ptr.html#Ptr"><span class="hs-identifier hs-type">Ptr</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679087437"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Ptr.html#Ptr"><span class="hs-identifier hs-type">Ptr</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679087437"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-389"></span><span>
</span><span id="line-390"></span><span>
</span><span id="line-391"></span><span class="hs-pragma">{-# LINE 391 &quot;libraries\\ghci\\GHCi\\InfoTable.hsc&quot; #-}</span><span>
</span><span id="line-391"></span><span>
</span><span id="line-392"></span><span class="hs-keyword">data</span><span> </span><span id="ExecPage"><span class="annot"><a href="GHCi.InfoTable.html#ExecPage"><span class="hs-identifier hs-var">ExecPage</span></a></span></span><span>
</span><span id="line-393"></span><span>
</span><span id="line-394"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="annot"><span class="hs-keyword">ccall</span></span><span> </span><span class="annot"><span class="hs-keyword">unsafe</span></span><span> </span><span class="annot"><span class="hs-string">&quot;allocateExecPage&quot;</span></span><span>
</span><span id="line-395"></span><span>  </span><span id="_allocateExecPage"><span class="annot"><a href="GHCi.InfoTable.html#_allocateExecPage"><span class="hs-identifier hs-var">_allocateExecPage</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Ptr.html#Ptr"><span class="hs-identifier hs-type">Ptr</span></a></span><span> </span><span class="annot"><a href="GHCi.InfoTable.html#ExecPage"><span class="hs-identifier hs-type">ExecPage</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-396"></span><span>
</span><span id="line-397"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="annot"><span class="hs-keyword">ccall</span></span><span> </span><span class="annot"><span class="hs-keyword">unsafe</span></span><span> </span><span class="annot"><span class="hs-string">&quot;freezeExecPage&quot;</span></span><span>
</span><span id="line-398"></span><span>  </span><span id="_freezeExecPage"><span class="annot"><a href="GHCi.InfoTable.html#_freezeExecPage"><span class="hs-identifier hs-var">_freezeExecPage</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Ptr.html#Ptr"><span class="hs-identifier hs-type">Ptr</span></a></span><span> </span><span class="annot"><a href="GHCi.InfoTable.html#ExecPage"><span class="hs-identifier hs-type">ExecPage</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-399"></span><span>
</span><span id="line-400"></span><span id="fillExecBuffer"><span class="annot"><span class="annottext">fillExecBuffer :: forall a. CSize -&gt; (Ptr a -&gt; Ptr a -&gt; IO ()) -&gt; IO (Ptr a)
</span><a href="GHCi.InfoTable.html#fillExecBuffer"><span class="hs-identifier hs-var hs-var">fillExecBuffer</span></a></span></span><span> </span><span id="local-6989586621679086952"><span class="annot"><span class="annottext">CSize
</span><a href="#local-6989586621679086952"><span class="hs-identifier hs-var">sz</span></a></span></span><span> </span><span id="local-6989586621679086951"><span class="annot"><span class="annottext">Ptr a -&gt; Ptr a -&gt; IO ()
</span><a href="#local-6989586621679086951"><span class="hs-identifier hs-var">cont</span></a></span></span><span>
</span><span id="line-401"></span><span>    </span><span class="hs-comment">-- we can only allocate single pages. This assumes a 4k page size which</span><span>
</span><span id="line-402"></span><span>    </span><span class="hs-comment">-- isn't strictly correct but is a reasonable conservative lower bound.</span><span>
</span><span id="line-403"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">CSize
</span><a href="#local-6989586621679086952"><span class="hs-identifier hs-var">sz</span></a></span><span> </span><span class="annot"><span class="annottext">CSize -&gt; CSize -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&gt;</span></span><span> </span><span class="annot"><span class="annottext">CSize
</span><span class="hs-number">4096</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; IO (Ptr a)
forall (m :: * -&gt; *) a. MonadFail m =&gt; String -&gt; m a
</span><a href="../../base/src/Control.Monad.Fail.html#fail"><span class="hs-identifier hs-var">fail</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;withExecBuffer: Too large&quot;</span></span><span>
</span><span id="line-404"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-405"></span><span>        </span><span id="local-6989586621679086949"><span class="annot"><span class="annottext">Ptr ExecPage
</span><a href="#local-6989586621679086949"><span class="hs-identifier hs-var">pg</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">IO (Ptr ExecPage)
</span><a href="GHCi.InfoTable.html#_allocateExecPage"><span class="hs-identifier hs-var">_allocateExecPage</span></a></span><span>
</span><span id="line-406"></span><span>        </span><span class="annot"><span class="annottext">Ptr a -&gt; Ptr a -&gt; IO ()
</span><a href="#local-6989586621679086951"><span class="hs-identifier hs-var">cont</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Ptr ExecPage -&gt; Ptr a
forall a b. Ptr a -&gt; Ptr b
</span><a href="../../base/src/GHC.Ptr.html#castPtr"><span class="hs-identifier hs-var">castPtr</span></a></span><span> </span><span class="annot"><span class="annottext">Ptr ExecPage
</span><a href="#local-6989586621679086949"><span class="hs-identifier hs-var">pg</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Ptr ExecPage -&gt; Ptr a
forall a b. Ptr a -&gt; Ptr b
</span><a href="../../base/src/GHC.Ptr.html#castPtr"><span class="hs-identifier hs-var">castPtr</span></a></span><span> </span><span class="annot"><span class="annottext">Ptr ExecPage
</span><a href="#local-6989586621679086949"><span class="hs-identifier hs-var">pg</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-407"></span><span>        </span><span class="annot"><span class="annottext">Ptr ExecPage -&gt; IO ()
</span><a href="GHCi.InfoTable.html#_freezeExecPage"><span class="hs-identifier hs-var">_freezeExecPage</span></a></span><span> </span><span class="annot"><span class="annottext">Ptr ExecPage
</span><a href="#local-6989586621679086949"><span class="hs-identifier hs-var">pg</span></a></span><span>
</span><span id="line-408"></span><span>        </span><span class="annot"><span class="annottext">Ptr a -&gt; IO (Ptr a)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Ptr ExecPage -&gt; Ptr a
forall a b. Ptr a -&gt; Ptr b
</span><a href="../../base/src/GHC.Ptr.html#castPtr"><span class="hs-identifier hs-var">castPtr</span></a></span><span> </span><span class="annot"><span class="annottext">Ptr ExecPage
</span><a href="#local-6989586621679086949"><span class="hs-identifier hs-var">pg</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-409"></span><span>
</span><span id="line-410"></span><span>
</span><span id="line-411"></span><span class="hs-pragma">{-# LINE 426 &quot;libraries\\ghci\\GHCi\\InfoTable.hsc&quot; #-}</span><span>
</span><span id="line-426"></span><span>
</span><span id="line-427"></span><span class="hs-comment">-- -----------------------------------------------------------------------------</span><span>
</span><span id="line-428"></span><span class="hs-comment">-- Constants and config</span><span>
</span><span id="line-429"></span><span>
</span><span id="line-430"></span><span class="annot"><a href="GHCi.InfoTable.html#wORD_SIZE"><span class="hs-identifier hs-type">wORD_SIZE</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span>
</span><span id="line-431"></span><span id="wORD_SIZE"><span class="annot"><span class="annottext">wORD_SIZE :: Int
</span><a href="GHCi.InfoTable.html#wORD_SIZE"><span class="hs-identifier hs-var hs-var">wORD_SIZE</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">8</span></span><span class="hs-special">)</span><span>
</span><span id="line-432"></span><span class="hs-pragma">{-# LINE 432 &quot;libraries\\ghci\\GHCi\\InfoTable.hsc&quot; #-}</span><span>
</span><span id="line-432"></span><span>
</span><span id="line-433"></span><span class="annot"><a href="GHCi.InfoTable.html#conInfoTableSizeB"><span class="hs-identifier hs-type">conInfoTableSizeB</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span>
</span><span id="line-434"></span><span id="conInfoTableSizeB"><span class="annot"><span class="annottext">conInfoTableSizeB :: Int
</span><a href="GHCi.InfoTable.html#conInfoTableSizeB"><span class="hs-identifier hs-var hs-var">conInfoTableSizeB</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="GHCi.InfoTable.html#wORD_SIZE"><span class="hs-identifier hs-var">wORD_SIZE</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="../../ghc-heap/src/GHC.Exts.Heap.InfoTable.html#itblSize"><span class="hs-identifier hs-var">itblSize</span></a></span><span>
</span><span id="line-435"></span></pre></body></html>